'use strict'

function fromDate (date) {
  return date.getTime() / 86400000 + 2440587.5
}

function toDate (julian) {
  return new Date((julian - 2440587.5) * 86400000)
}

exports.fromDate = fromDate
exports.toDate = toDate
