4{-| Library for working with dates. Email the mailing list if you encounter
5issues with internationalization or locale formatting.
8@docs read, toTime, fromTime
11@docs year, month, Month, day, dayOfWeek, Day, hour, minute, second
21{-| Represents the days of the week. -}
22data Day = Mon | Tue | Wed | Thu | Fri | Sat | Sun
24{-| Represents the month of the year. -}
25data Month = Jan | Feb | Mar | Apr
26 | May | Jun | Jul | Aug
27 | Sep | Oct | Nov | Dec
29{-| Attempt to read a date from a string. -}
30read : String -> Maybe Date
31read = Native.Date.read
33{-| Convert a date into a time since midnight (UTC) of 1 January 1990 (i.e.
34[UNIX time](http://en.wikipedia.org/wiki/Unix_time)). Given the date 23 June
351990 at 11:45AM this returns the corresponding time. -}
37toTime = Native.Date.toTime
39{-| Take a UNIX time and convert it to a `Date` -}
40fromTime : Time -> Date
41fromTime = Native.Date.fromTime
43{-| Extract the year of a given date. Given the date 23 June 1990 at 11:45AM
44this returns the integer `1990`. -}
46year = Native.Date.year
48{-| Extract the month of a given date. Given the date 23 June 1990 at 11:45AM
49this returns the Month `Jun` as defined below. -}
51month = Native.Date.month
53{-| Extract the day of a given date. Given the date 23 June 1990 at 11:45AM
54this returns the integer `23`. -}
58{-| Extract the day of the week for a given date. Given the date 23 June
591990 at 11:45AM this returns the Day `Thu` as defined below. -}
60dayOfWeek : Date -> Day
61dayOfWeek = Native.Date.dayOfWeek
63{-| Extract the hour of a given date. Given the date 23 June 1990 at 11:45AM
64this returns the integer `11`. -}
66hour = Native.Date.hour
68{-| Extract the minute of a given date. Given the date 23 June 1990 at 11:45AM
69this returns the integer `45`. -}
71minute = Native.Date.minute
73{-| Extract the second of a given date. Given the date 23 June 1990 at 11:45AM
74this returns the integer `0`. -}
76second = Native.Date.second
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list