Calculate the present UTC Julian Date. - Node.js Date

Node.js examples for Date:Date Calculation

Description

Calculate the present UTC Julian Date.

Demo Code


//Function is valid after     * the beginning of the UNIX epoch 1970-01-01 and ignores leap seconds. */
     /*from   www .j av  a2  s  . co  m*/
/* Terminator.js -- Overlay day/night region on a Leaflet map */

Date.prototype.getJulian = function() {
    /* Calculate the present UTC Julian Date. Function is valid after
     * the beginning of the UNIX epoch 1970-01-01 and ignores leap
     * seconds. */
    return (this / 86400000) + 2440587.5;
}

Related Tutorials