Javascript Date toUTCArray()

Description

Javascript Date toUTCArray()


/**/*from   ww w.j  a v a 2  s.  co m*/
 * Extend native Date object with useful additional functions.
 */

Date.prototype.toUTCArray = function() {
    var D = this;
    return [D.getUTCFullYear(), D.getUTCMonth(), D.getUTCDate(), D.getUTCHours(), D.getUTCMinutes(), D.getUTCSeconds()];
}



PreviousNext

Related