4{-| Library for working with dates. Email the mailing list if you encounter
5issues with internationalization or locale formatting.
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{-| Extract the year of a given date. Given the date 23 June 1990 at 11:45AM
40this returns the integer `1990`. -}
42year = Native.Date.year
44{-| Extract the month of a given date. Given the date 23 June 1990 at 11:45AM
45this returns the Month `Jun` as defined below. -}
47month = Native.Date.month
49{-| Extract the day of a given date. Given the date 23 June 1990 at 11:45AM
50this returns the integer `23`. -}
54{-| Extract the day of the week for a given date. Given the date 23 June
551990 at 11:45AM this returns the Day `Thu` as defined below. -}
56dayOfWeek : Date -> Day
57dayOfWeek = Native.Date.dayOfWeek
59{-| Extract the hour of a given date. Given the date 23 June 1990 at 11:45AM
60this returns the integer `11`. -}
62hour = Native.Date.hour
64{-| Extract the minute of a given date. Given the date 23 June 1990 at 11:45AM
65this returns the integer `45`. -}
67minute = Native.Date.minute
69{-| Extract the second of a given date. Given the date 23 June 1990 at 11:45AM
70this returns the integer `0`. -}
72second = 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