Sinespace Client
2023.2.17543
Client-side scripting for Sinespace
|
Public Member Functions | |
SDateTime () | |
Creates a new SDateTime object. More... | |
SDateTime (DateTime dateTime) | |
Creates a new SDateTime object from a DateTime object. More... | |
SDateTime (int? Year=null, int? Month=null, int? Day=null, int? Hour=null, int? Minute=null, int? Second=null, int? Millisecond=null) | |
Creates a new SDateTime object by assigning values to each time unit. Time unit will be current time if not be assigned. SDateTime will be current time if cannot be created. More... | |
bool | Equals (SDateTime other) |
Returns true if the datetimes are same. More... | |
int | ComparesTo (SDateTime other) |
Compares two datetimes and returns an integer. 0 == identical. greater than 0 == This datetime is greater than other. less than 0 == This datetime is less than other. More... | |
string | FormatLocal (string format) |
Outputs a custom formatted string with the date and time according to local language rules. More... | |
string | FormatGlobal (string format) |
Outputs a custom formatted string with the date and time according to global rules (culture invariant). More... | |
string | Regional (string region) |
Outputs a string with the date and time formatted according to specific regional rules. More... | |
string | FormatRegional (string region, string format) |
Outputs a custom formatted string with the date and time according to specific regional rules. More... | |
SDateTime | AddYears (int amount) |
Return a new SDateTime that is the current date time + amount years. More... | |
SDateTime | AddMonths (int amount) |
Return a new SDateTime that is the current date time + amount months. More... | |
SDateTime | AddDays (double amount) |
Return a new SDateTime that is the current date time + amount days. More... | |
SDateTime | AddHours (double amount) |
Return a new SDateTime that is the current date time + amount hours. More... | |
SDateTime | AddMinutes (double amount) |
Return a new SDateTime that is the current date time + amount minutes. More... | |
SDateTime | AddSeconds (double amount) |
Return a new SDateTime that is the current date time + amount seconds. More... | |
SDateTime | AddMilliseconds (double amount) |
Return a new SDateTime that is the current date time + amount milliseconds. More... | |
Static Public Member Functions | |
static SDateTime | Now () |
Creates a new SDateTime object equal to the current local time. More... | |
static SDateTime | Server () |
Creates a new SDateTime object equal to the current server time. More... | |
static SDateTime | Parse (string input) |
Creates a new SDateTime object by attempting to parse a string input. Returns null/nil if the string cannot be parsed. More... | |
static bool | IsLeapYear (int year) |
Return true if the specified year is a leap year. More... | |
static int | DaysInMonth (int year, int month) |
Return the number of days in the given month for the given year. More... | |
Properties | |
int | Year [get] |
Get the independent time unit property of the SDateTime object. More... | |
int | Month [get] |
int | Day [get] |
int | Hour [get] |
int | Minute [get] |
int | Second [get] |
int | Millisecond [get] |
string | Local [get] |
Outputs a string with the date and time formatted according to local language rules. More... | |
string | Global [get] |
Outputs a string with the date and time formatted according to global rules (culture invariant). More... | |
int | UnixTime [get] |
Return this time in Unix time, the number of seconds since Jan 1st, 1970. More... | |
bool | IsDaylightSavingTime [get] |
Indicates whether this instance of DateTime is within the daylight saving time range for the current time zone. More... | |
SineSpace.Scripting.Types.SDateTime.SDateTime | ( | ) |
Creates a new SDateTime object.
SineSpace.Scripting.Types.SDateTime.SDateTime | ( | DateTime | dateTime | ) |
Creates a new SDateTime object from a DateTime object.
dateTime |
SineSpace.Scripting.Types.SDateTime.SDateTime | ( | int? | Year = null , |
int? | Month = null , |
||
int? | Day = null , |
||
int? | Hour = null , |
||
int? | Minute = null , |
||
int? | Second = null , |
||
int? | Millisecond = null |
||
) |
SDateTime SineSpace.Scripting.Types.SDateTime.AddDays | ( | double | amount | ) |
Return a new SDateTime that is the current date time + amount days.
amount |
SDateTime SineSpace.Scripting.Types.SDateTime.AddHours | ( | double | amount | ) |
Return a new SDateTime that is the current date time + amount hours.
amount |
SDateTime SineSpace.Scripting.Types.SDateTime.AddMilliseconds | ( | double | amount | ) |
Return a new SDateTime that is the current date time + amount milliseconds.
amount |
SDateTime SineSpace.Scripting.Types.SDateTime.AddMinutes | ( | double | amount | ) |
Return a new SDateTime that is the current date time + amount minutes.
amount |
SDateTime SineSpace.Scripting.Types.SDateTime.AddMonths | ( | int | amount | ) |
Return a new SDateTime that is the current date time + amount months.
amount |
SDateTime SineSpace.Scripting.Types.SDateTime.AddSeconds | ( | double | amount | ) |
Return a new SDateTime that is the current date time + amount seconds.
amount |
SDateTime SineSpace.Scripting.Types.SDateTime.AddYears | ( | int | amount | ) |
Return a new SDateTime that is the current date time + amount years.
amount |
int SineSpace.Scripting.Types.SDateTime.ComparesTo | ( | SDateTime | other | ) |
Compares two datetimes and returns an integer. 0 == identical. greater than 0 == This datetime is greater than other. less than 0 == This datetime is less than other.
other | Another datetime you want to compare |
|
static |
Return the number of days in the given month for the given year.
year | |
month |
bool SineSpace.Scripting.Types.SDateTime.Equals | ( | SDateTime | other | ) |
Returns true if the datetimes are same.
other | Another datetime you want to compare |
string SineSpace.Scripting.Types.SDateTime.FormatGlobal | ( | string | format | ) |
Outputs a custom formatted string with the date and time according to global rules (culture invariant).
format | A string indicating the desired output format. |
string SineSpace.Scripting.Types.SDateTime.FormatLocal | ( | string | format | ) |
Outputs a custom formatted string with the date and time according to local language rules.
format | A string indicating the desired output format. |
string SineSpace.Scripting.Types.SDateTime.FormatRegional | ( | string | region, |
string | format | ||
) |
Outputs a custom formatted string with the date and time according to specific regional rules.
format | A string indicating the desired output format. |
|
static |
Return true if the specified year is a leap year.
year |
|
static |
Creates a new SDateTime object equal to the current local time.
|
static |
Creates a new SDateTime object by attempting to parse a string input. Returns null/nil if the string cannot be parsed.
input | The string to parse into a date. |
string SineSpace.Scripting.Types.SDateTime.Regional | ( | string | region | ) |
Outputs a string with the date and time formatted according to specific regional rules.
region | The region to put the date time in, such as en-US. |
|
static |
Creates a new SDateTime object equal to the current server time.
|
get |
|
get |
Outputs a string with the date and time formatted according to global rules (culture invariant).
|
get |
|
get |
Indicates whether this instance of DateTime is within the daylight saving time range for the current time zone.
|
get |
Outputs a string with the date and time formatted according to local language rules.
|
get |
|
get |
|
get |
|
get |
|
get |
Return this time in Unix time, the number of seconds since Jan 1st, 1970.
|
get |
Get the independent time unit property of the SDateTime object.