broke datetime2julian out into its own function for easier reuse