Safe Haskell | None |
---|
The Date
module provides the API for the Javascript Date
object. The API documentation is mainly taken from
w3schools (http://www.w3schools.com/jsref/jsref_obj_date.asp).
Deprecated methods are not supported.
- data JSDate
- newDate :: SunroofArgument a => a -> JS t JSDate
- getHours :: JSDate -> JS t JSNumber
- getMinutes :: JSDate -> JS t JSNumber
- getSeconds :: JSDate -> JS t JSNumber
- getDate :: JSDate -> JS t JSNumber
- getDay :: JSDate -> JS t JSNumber
- getFullYear :: JSDate -> JS t JSNumber
- getMilliseconds :: JSDate -> JS t JSNumber
- getMonth :: JSDate -> JS t JSNumber
- getTime :: JSDate -> JS t JSNumber
- getTimezoneOffset :: JSDate -> JS t JSNumber
- getUTCDate :: JSDate -> JS t JSNumber
- getUTCDay :: JSDate -> JS t JSNumber
- getUTCFullYear :: JSDate -> JS t JSNumber
- getUTCHours :: JSDate -> JS t JSNumber
- getUTCMilliseconds :: JSDate -> JS t JSNumber
- getUTCMinutes :: JSDate -> JS t JSNumber
- getUTCMonth :: JSDate -> JS t JSNumber
- getUTCSeconds :: JSDate -> JS t JSNumber
- parseDate :: JSString -> JSDate -> JS t JSNumber
- setDate :: JSNumber -> JSDate -> JS t ()
- setFullYear :: JSNumber -> JSDate -> JS t ()
- setHours :: JSNumber -> JSDate -> JS t ()
- setMilliseconds :: JSNumber -> JSDate -> JS t ()
- setMinutes :: JSNumber -> JSDate -> JS t ()
- setMonth :: JSNumber -> JSDate -> JS t ()
- setSeconds :: JSNumber -> JSDate -> JS t ()
- setTime :: JSNumber -> JSDate -> JS t ()
- setUTCDate :: JSNumber -> JSDate -> JS t ()
- setUTCFullYear :: JSNumber -> JSDate -> JS t ()
- setUTCHours :: JSNumber -> JSDate -> JS t ()
- setUTCMilliseconds :: JSNumber -> JSDate -> JS t ()
- setUTCMinutes :: JSNumber -> JSDate -> JS t ()
- setUTCMonth :: JSNumber -> JSDate -> JS t ()
- setUTCSeconds :: JSNumber -> JSDate -> JS t ()
- toDateString :: JSDate -> JS t JSString
- toISOString :: JSDate -> JS t JSString
- toJSON :: JSDate -> JS t JSString
- toLocaleDateString :: JSDate -> JS t JSString
- toLocaleTimeString :: JSDate -> JS t JSString
- toLocaleString :: JSDate -> JS t JSString
- toString :: JSDate -> JS t JSString
- toTimeString :: JSDate -> JS t JSString
- toUTCString :: JSDate -> JS t JSString
Documentation
The type of a date object.
newDate :: SunroofArgument a => a -> JS t JSDateSource
Creates a new Date
object.
See: http://www.w3schools.com/jsref/jsref_obj_date.asp
getHours :: JSDate -> JS t JSNumberSource
Returns the hour (from 0-23). See: http://www.w3schools.com/jsref/jsref_gethours.asp
getMinutes :: JSDate -> JS t JSNumberSource
Returns the minutes (from 0-59). See: http://www.w3schools.com/jsref/jsref_getminutes.asp
getSeconds :: JSDate -> JS t JSNumberSource
Returns the seconds (from 0-59). See: http://www.w3schools.com/jsref/jsref_getseconds.asp
getDate :: JSDate -> JS t JSNumberSource
Returns the day of the month (from 1-31). See: http://www.w3schools.com/jsref/jsref_getdate.asp
getDay :: JSDate -> JS t JSNumberSource
Returns the day of the week (from 0-6). See: http://www.w3schools.com/jsref/jsref_getday.asp
getFullYear :: JSDate -> JS t JSNumberSource
Returns the year (four digits). See: http://www.w3schools.com/jsref/jsref_getfullyear.asp
getMilliseconds :: JSDate -> JS t JSNumberSource
Returns the milliseconds (from 0-999). See: http://www.w3schools.com/jsref/jsref_getmilliseconds.asp
getMonth :: JSDate -> JS t JSNumberSource
Returns the month (from 0-11). See: http://www.w3schools.com/jsref/jsref_getmonth.asp
getTime :: JSDate -> JS t JSNumberSource
Returns the number of milliseconds since midnight Jan 1, 1970. See: http://www.w3schools.com/jsref/jsref_gettime.asp
getTimezoneOffset :: JSDate -> JS t JSNumberSource
Returns the time difference between UTC time and local time, in minutes. See: http://www.w3schools.com/jsref/jsref_gettimezoneoffset.asp
getUTCDate :: JSDate -> JS t JSNumberSource
Returns the day of the month, according to universal time (from 1-31). See: http://www.w3schools.com/jsref/jsref_getutcdate.asp
getUTCDay :: JSDate -> JS t JSNumberSource
Returns the day of the week, according to universal time (from 0-6). See: http://www.w3schools.com/jsref/jsref_getutcday.asp
getUTCFullYear :: JSDate -> JS t JSNumberSource
Returns the year, according to universal time (four digits). See: http://www.w3schools.com/jsref/jsref_getutcfullyear.asp
getUTCHours :: JSDate -> JS t JSNumberSource
Returns the hour, according to universal time (from 0-23). See: http://www.w3schools.com/jsref/jsref_getutchours.asp
getUTCMilliseconds :: JSDate -> JS t JSNumberSource
Returns the milliseconds, according to universal time (from 0-999). See: http://www.w3schools.com/jsref/jsref_getutcmilliseconds.asp
getUTCMinutes :: JSDate -> JS t JSNumberSource
Returns the minutes, according to universal time (from 0-59). See: http://www.w3schools.com/jsref/jsref_getutcminutes.asp
getUTCMonth :: JSDate -> JS t JSNumberSource
Returns the month, according to universal time (from 0-11). See: http://www.w3schools.com/jsref/jsref_getutcmonth.asp
getUTCSeconds :: JSDate -> JS t JSNumberSource
Returns the seconds, according to universal time (from 0-59). See: http://www.w3schools.com/jsref/jsref_getutcseconds.asp
parseDate :: JSString -> JSDate -> JS t JSNumberSource
Parses a date string and returns the number of milliseconds since midnight of January 1, 1970. See: http://www.w3schools.com/jsref/jsref_parse.asp
setDate :: JSNumber -> JSDate -> JS t ()Source
Sets the day of the month of a date object. See: http://www.w3schools.com/jsref/jsref_setdate.asp
setFullYear :: JSNumber -> JSDate -> JS t ()Source
Sets the year (four digits) of a date object. See: http://www.w3schools.com/jsref/jsref_setfullyear.asp
setHours :: JSNumber -> JSDate -> JS t ()Source
Sets the hour of a date object. See: http://www.w3schools.com/jsref/jsref_sethours.asp
setMilliseconds :: JSNumber -> JSDate -> JS t ()Source
Sets the milliseconds of a date object. See: http://www.w3schools.com/jsref/jsref_setmilliseconds.asp
setMinutes :: JSNumber -> JSDate -> JS t ()Source
Set the minutes of a date object. See: http://www.w3schools.com/jsref/jsref_setminutes.asp
setMonth :: JSNumber -> JSDate -> JS t ()Source
Sets the month of a date object. See: http://www.w3schools.com/jsref/jsref_setmonth.asp
setSeconds :: JSNumber -> JSDate -> JS t ()Source
Sets the seconds of a date object. See: http://www.w3schools.com/jsref/jsref_setseconds.asp
setTime :: JSNumber -> JSDate -> JS t ()Source
Sets a date and time by adding or subtracting a specified number of milliseconds to/from midnight January 1, 1970. See: http://www.w3schools.com/jsref/jsref_settime.asp
setUTCDate :: JSNumber -> JSDate -> JS t ()Source
Sets the day of the month of a date object, according to universal time. See: http://www.w3schools.com/jsref/jsref_setutcdate.asp
setUTCFullYear :: JSNumber -> JSDate -> JS t ()Source
Sets the year of a date object, according to universal time (four digits). See: http://www.w3schools.com/jsref/jsref_setutcfullyear.asp
setUTCHours :: JSNumber -> JSDate -> JS t ()Source
Sets the hour of a date object, according to universal time. See: http://www.w3schools.com/jsref/jsref_setutchours.asp
setUTCMilliseconds :: JSNumber -> JSDate -> JS t ()Source
Sets the milliseconds of a date object, according to universal time. See: http://www.w3schools.com/jsref/jsref_setutcmilliseconds.asp
setUTCMinutes :: JSNumber -> JSDate -> JS t ()Source
Set the minutes of a date object, according to universal time. See: http://www.w3schools.com/jsref/jsref_setutcminutes.asp
setUTCMonth :: JSNumber -> JSDate -> JS t ()Source
Sets the month of a date object, according to universal time. See: http://www.w3schools.com/jsref/jsref_setutcmonth.asp
setUTCSeconds :: JSNumber -> JSDate -> JS t ()Source
Set the seconds of a date object, according to universal time. See: http://www.w3schools.com/jsref/jsref_setutcseconds.asp
toDateString :: JSDate -> JS t JSStringSource
Converts the date portion of a Date object into a readable string. See: http://www.w3schools.com/jsref/jsref_todatestring.asp
toISOString :: JSDate -> JS t JSStringSource
Returns the date as a string, using the ISO standard. See: http://www.w3schools.com/jsref/jsref_toisostring.asp
toJSON :: JSDate -> JS t JSStringSource
Returns the date as a string, formated as a JSON date. See: http://www.w3schools.com/jsref/jsref_tojson.asp
toLocaleDateString :: JSDate -> JS t JSStringSource
Returns the date portion of a Date object as a string, using locale conventions. See: http://www.w3schools.com/jsref/jsref_tolocaledatestring.asp
toLocaleTimeString :: JSDate -> JS t JSStringSource
Returns the time portion of a Date object as a string, using locale conventions. See: http://www.w3schools.com/jsref/jsref_tolocaletimestring.asp
toLocaleString :: JSDate -> JS t JSStringSource
Converts a Date object to a string, using locale conventions. See: http://www.w3schools.com/jsref/jsref_tolocalestring.asp
toString :: JSDate -> JS t JSStringSource
Converts a Date object to a string. See: http://www.w3schools.com/jsref/jsref_tostring_date.asp
toTimeString :: JSDate -> JS t JSStringSource
Converts the time portion of a Date object to a string. See: http://www.w3schools.com/jsref/jsref_totimestring.asp
toUTCString :: JSDate -> JS t JSStringSource
Converts a Date object to a string, according to universal time. See: http://www.w3schools.com/jsref/jsref_toutcstring.asp