lib/timestamp.js
function () {
    let date = new Date();
    let result = {};
    let regex = /(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d).\d\d\dZ/g;
    let current = regex.exec(date.toJSON());
    if (current === null || current.length < 7) {
        return null;
    }
    for (let i = 0; i < 6; i++) {
        //The first element is the full matched string
        result[values[i]] = current[i + 1];
    }
    return result;
}
function () {
    let date = new Date();
    let result = {};
    let regex = /(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d).\d\d\dZ/g;
    let current = regex.exec(date.toJSON());
    if (current === null || current.length < 7) {
        return null;
    }
    for (let i = 0; i < 6; i++) {
        //The first element is the full matched string
        result[values[i]] = current[i + 1];
    }
    return result;
}
function ( ) { let date = new Date ( ) ; let result = { } ; let regex = / (\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d).\d\d\dZ / g ; let current = regex . exec ( date . toJSON ( ) ) ; if ( current === null || current . length < 7 ) { return null ; } for ( let i = 0 ; i < 6 ; i ++ ) { //The first element is the full matched string result [ values [ i ] ] = current [ i + 1 ] ; } return result ; }
Get the current time
Get the current time