Discordian.Calendar (discordian v0.1.0) View Source
Link to this section Summary
Functions
Converts the date into a string according to the calendar.
Converts the datetime (with time zone) into a string according to the calendar.
Calculates the day and era from the given year, month, and day.
Calculates the day of the week from the given year, month, and day.
Calculates the day of the year from the given year, month, and day.
Define the rollover moment for the given calendar.
Returns how many days there are in the given year-month.
Returns true if the given year is a leap year.
Returns how many months there are in the given year.
Converts iso_days/0 to the Calendar's datetime format.
Converts the given datetime (without time zone) into the iso_days/0 format.
Converts the datetime (without time zone) into a string according to the calendar.
Parses the string representation for a date returned by date_to_string/3 into a date-tuple.
Parses the string representation for a naive datetime returned by naive_datetime_to_string/7 into a naive-datetime-tuple.
Parses the string representation for a time returned by time_to_string/4 into a time-tuple.
Parses the string representation for a datetime returned by datetime_to_string/11 into a datetime-tuple.
Calculates the quarter of the year from the given year, month, and day.
Converts day_fraction/0 to the Calendar's time format.
Converts the given time to the day_fraction/0 format.
Converts the time into a string according to the calendar.
Should return true if the given date describes a proper date in the calendar.
Should return true if the given time describes a proper time in the calendar.
Calculates the year and era from the given year.
Link to this section Types
Specs
day() :: 1..73
Specs
day_of_week() :: 1..5
Specs
hour() :: 0..23
Specs
microsecond() :: Integer.t()
Specs
minute() :: 0..59
Specs
month() :: 1..6
Specs
second() :: 0..60
Specs
year() :: Integer.t()
Link to this section Functions
Specs
Converts the date into a string according to the calendar.
datetime_to_string(year, month, day, hour, minute, second, microsecond, time_zone, zone_abbr, utc_offset, std_offset)
View SourceConverts the datetime (with time zone) into a string according to the calendar.
Specs
day_of_era(year(), month(), day()) :: {day :: pos_integer(), era :: 0..1}
Calculates the day and era from the given year, month, and day.
Specs
day_of_week(year(), month(), day()) :: day_of_week()
Calculates the day of the week from the given year, month, and day.
Specs
Calculates the day of the year from the given year, month, and day.
Define the rollover moment for the given calendar.
Specs
days_in_month(Calendar.year(), Calendar.month()) :: Calendar.day()
Returns how many days there are in the given year-month.
Specs
leap_year?(Calendar.year()) :: boolean()
Returns true if the given year is a leap year.
Specs
months_in_year(year()) :: 5
Returns how many months there are in the given year.
Specs
naive_datetime_from_iso_days(Calendar.iso_days()) :: {Calendar.year(), Calendar.month(), Calendar.day(), Calendar.hour(), Calendar.minute(), Calendar.second(), Calendar.microsecond()}
Converts iso_days/0 to the Calendar's datetime format.
naive_datetime_to_iso_days(year, month, day, hour, minute, second, microsecond)
View SourceSpecs
naive_datetime_to_iso_days( Calendar.year(), Calendar.month(), Calendar.day(), Calendar.hour(), Calendar.minute(), Calendar.second(), Calendar.microsecond() ) :: Calendar.iso_days()
Converts the given datetime (without time zone) into the iso_days/0 format.
naive_datetime_to_string(year, month, day, hour, minute, second, microsecond)
View SourceSpecs
naive_datetime_to_string( year(), month(), day(), hour(), minute(), second(), microsecond() ) :: String.t()
Converts the datetime (without time zone) into a string according to the calendar.
Parses the string representation for a date returned by date_to_string/3 into a date-tuple.
Parses the string representation for a naive datetime returned by naive_datetime_to_string/7 into a naive-datetime-tuple.
Parses the string representation for a time returned by time_to_string/4 into a time-tuple.
Parses the string representation for a datetime returned by datetime_to_string/11 into a datetime-tuple.
Specs
Calculates the quarter of the year from the given year, month, and day.
Specs
time_from_day_fraction(Calendar.day_fraction()) :: {Calendar.hour(), Calendar.minute(), Calendar.second(), Calendar.microsecond()}
Converts day_fraction/0 to the Calendar's time format.
Specs
time_to_day_fraction( Calendar.hour(), Calendar.minute(), Calendar.second(), Calendar.microsecond() ) :: Calendar.day_fraction()
Converts the given time to the day_fraction/0 format.
Converts the time into a string according to the calendar.
Should return true if the given date describes a proper date in the calendar.
Should return true if the given time describes a proper time in the calendar.
Specs
Calculates the year and era from the given year.