Timex.Calendar.Julian (timex v3.7.0) View Source
This module contains functions for working with dates in the Julian calendar.
Link to this section Summary
Functions
Returns the day of the week, starting with 0 for Sunday, or 1 for Monday
Same as day_of_week/1, except takes year/month/day as distinct arguments
Returns the Julian day number for the given Erlang date (gregorian)
Same as julian_date/1, except takes year/month/day as distinct arguments
Same as julian_date/1, except takes year/month/day/hour/minute/second as distinct arguments
Link to this section Functions
Specs
day_of_week(Timex.Types.date(), :sun | :mon) :: Timex.Types.weekday()
Returns the day of the week, starting with 0 for Sunday, or 1 for Monday
Specs
day_of_week( Timex.Types.year(), Timex.Types.month(), Timex.Types.day(), :sun | :mon ) :: Timex.Types.weekday()
Same as day_of_week/1, except takes year/month/day as distinct arguments
Specs
julian_date(Timex.Types.date()) :: integer()
julian_date(Timex.Types.datetime()) :: integer()
Returns the Julian day number for the given Erlang date (gregorian)
The Julian date (JD) is a continuous count of days from 1 January 4713 BC (= -4712 January 1), Greenwich mean noon (= 12h UT). For example, AD 1978 January 1, 0h UT is JD 2443509.5 and AD 1978 July 21, 15h UT, is JD 2443711.125.
This algorithm assumes a proleptic Gregorian calendar (i.e. dates back to year 0), unlike the NASA or US Naval Observatory algorithm - however they align perfectly for dates back to October 15th, 1582, which is where it starts to differ, which is due to the fact that their algorithm assumes there is no Gregorian calendar before that date.
Specs
julian_date(Timex.Types.year(), Timex.Types.month(), Timex.Types.day()) :: integer()
Same as julian_date/1, except takes year/month/day as distinct arguments
Specs
julian_date( Timex.Types.year(), Timex.Types.month(), Timex.Types.day(), Timex.Types.hour(), Timex.Types.minute(), Timex.Types.second() ) :: float()
Same as julian_date/1, except takes year/month/day/hour/minute/second as distinct arguments