@technobuddha/library
Version:
A large library of useful functions
18 lines (17 loc) • 532 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getJulian = void 0;
var constants_1 = require("../constants");
/**
* Get the Julian date (number of days since noon on Monday, Janurary 1 4713 BCE)
*
* @remarks Julian dates are always in the UTC timezone
*
* @param input The date and time to convert
* @returns The julian date.
*/
function getJulian(input) {
return (input.getTime() / constants_1.ticksPerDay) + 2440587.5;
}
exports.getJulian = getJulian;
exports.default = getJulian;