Formerly Morgan-Stanley/morphir-elm. Search finds this package by either name.
This module adds the definition of a date without time zones. Useful in business modeling.
Find the number of days between the given dates.
Find the number of weeks between the given dates.
Find the number of months between the given dates.
Find the number of years between the given dates.
Add the given days to a given date.
Add the given weeks to a given date.
Add the given months to a given date.
Add the given years to a given date.
Create a date from a calendar date: a year, month, and day of the month. Out-of-range day values will be clamped.
import Morphir.SDK.LocalDate exposing (fromCalendarDate, Month(..))
fromCalendarDate 2018 September 26Construct a LocalDate based on ISO formatted string. Opportunity for error denoted by Maybe return type.
Create a date from an ordinal date: a year and day of the year. Out-of-range day values will be clamped.
import Morphir.SDK.LocalDate exposing (fromOrdinalDate)
fromOrdinalDate 2018 269Construct a LocalDate based on Year, Month, Day. Opportunity for error denoted by Maybe return type. Errors can occur when any of the given values fall outside of their relevant constraints. For example, the date given as 2000 2 30 (2000-Feb-30) would fail because the day of the 30th is impossible.
Convert a LocalDate to a string in ISO format.
Converts a Month to an Int, where January is month 1 and December is month 12.
Type that represents a day of the week.
Returns true if the date falls on a weekend (Saturday or Sunday).
Returns true if the date falls on a weekday (any day other than Saturday or Sunday).
Gregorian calendar months in English.
Returns the year as a number.
Returns the month of the year as an Int, where January is month 1 and December is month 12.
The day of the month (1–31).
Concept of a date without time zones.