ScriptDate

The Date class

Constructors

this
this()

Creates a Date representing the time and date of object creation

this
this(long num)
Undocumented in source.
this
this(int year, int monthIndex, int day, int hours, int minutes, int seconds, int milliseconds)

takes month 0-11 like JavaScript

this
this(string str)

This string has to be formatted as "2020-Jan-01 00:00:00" for example. Anything different throws an exception

Members

Functions

getDate
int getDate()

returns day of month

getDay
int getDay()

returns day of week

getFullYear
int getFullYear()
Undocumented in source. Be warned that the author may not have intended to support it.
getHours
int getHours()

get the hour of the date

getMilliseconds
long getMilliseconds()
Undocumented in source. Be warned that the author may not have intended to support it.
getMinutes
int getMinutes()
Undocumented in source. Be warned that the author may not have intended to support it.
getMonth
int getMonth()

returns month from 0-11

getSeconds
int getSeconds()
Undocumented in source. Be warned that the author may not have intended to support it.
getTime
long getTime()
Undocumented in source. Be warned that the author may not have intended to support it.
getTimezone
long getTimezone()
Undocumented in source. Be warned that the author may not have intended to support it.
setDate
void setDate(int d)
Undocumented in source. Be warned that the author may not have intended to support it.
setFullYear
void setFullYear(int year)
Undocumented in source. Be warned that the author may not have intended to support it.
setHours
void setHours(int hours, int minutes, int seconds)
Undocumented in source. Be warned that the author may not have intended to support it.
setMilliseconds
void setMilliseconds(uint ms)
Undocumented in source. Be warned that the author may not have intended to support it.
setMinutes
void setMinutes(uint minutes)
Undocumented in source. Be warned that the author may not have intended to support it.
setMonth
void setMonth(uint month)
Undocumented in source. Be warned that the author may not have intended to support it.
setSeconds
void setSeconds(uint s)
Undocumented in source. Be warned that the author may not have intended to support it.
setTime
void setTime(long unixTimeMs)
Undocumented in source. Be warned that the author may not have intended to support it.
toISOString
string toISOString()
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
toUTC
ScriptDate toUTC()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta