julian.js 226 B

123456789101112
  1. 'use strict'
  2. function fromDate(date) {
  3. return date.getTime() / 86400000 + 2440587.5
  4. }
  5. function toDate(julian) {
  6. return new Date((julian - 2440587.5) * 86400000)
  7. }
  8. //exports.fromDate = fromDate
  9. //exports.toDate = toDate