src/main.js
function getCLFOffset(date) {
	const offset	= date.getTimezoneOffset().toString();
	const op		= offset[0] === '-' ? '-' : '+';
	let number		= offset.replace(op, '');

	while (number.length < 4) {
		number = `0${number}`;
	}

	return `${op}${number}`;
}
function getCLFOffset(date) {
	const offset	= date.getTimezoneOffset().toString();
	const op		= offset[0] === '-' ? '-' : '+';
	let number		= offset.replace(op, '');

	while (number.length < 4) {
		number = `0${number}`;
	}

	return `${op}${number}`;
}
function getCLFOffset ( date ) { const offset = date . getTimezoneOffset ( ) . toString ( ) ; const op = offset [ 0 ] === '-' ? '-' : '+' ; let number = offset . replace ( op , '' ) ; while ( number . length < 4 ) { number = ` ${ number } ` ; } return ` ${ op } ${ number } ` ; }
Return the offset from UTC in CLF format.
@param {Date} date - The date
@return {String} The offset.
Return the offset from UTC in CLF format .