Convert between Javascript Date and Julian Dates they use in astronomy