sunroof-compiler-0.2: Monadic Javascript Compiler

Safe HaskellNone

Language.Sunroof.JS.Date

Description

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.

Synopsis

Documentation

data JSDate Source

The type of a date object.

Instances

Show JSDate

Show the Javascript.

IfB JSDate

Can be returned in branches.

EqB JSDate

Reference equality, not value equality.

Sunroof JSDate

First-class values in Javascript.

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

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

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