public class Date
A date / time structure
| Modifier and Type | Field |
|---|---|
SystemTime |
_value
|
| Modifier and Type | Constructor / Static Method |
|---|---|
Date |
constructor()
Creates the minimal date/time value
|
Date |
constructor(SystemTime val)
Converts a system time to the date / time structure
|
Date |
new(IntNumber year, IntNumber month, IntNumber day, IntNumber hour, IntNumber minute, IntNumber second)
Creates a date / time with the provided values
|
Date |
new(IntNumber year, IntNumber month, IntNumber day)
Creates a date / time with the provided values
|
| Modifier and Type | Static Property |
|---|---|
get Date |
Default()
Returns the minimal date/time value
|
get Date |
MinValue()
Returns the minimal date/time value
|
get Date |
Now()
Returns the current local date / time
|
get Date |
UtcNow()
Returns the current UTC date / time
|
| Modifier and Type | Property |
|---|---|
get IntNumber |
Day()
Gets the day component of the date / time
|
get IntNumber |
DayOfWeek()
Gets the day of the week component of the date / time
|
get IntNumber |
Hour()
Gets the hour component of the date / time
|
get IntNumber |
Millisecond()
Gets the millisecond component of the date / time
|
get IntNumber |
Minute()
Gets the minute component of the date / time
|
get IntNumber |
Month()
Gets the month component of the date / time
|
get IntNumber |
Second()
Gets the second component of the date / time
|
get SystemTime |
SystemTime()
Returns the date / time as a system time
|
get IntNumber |
Year()
Gets the year component of the date / time
|
| Modifier and Type | Conversion Method |
|---|---|
SystemTime |
cast()
|
TimeStruct |
cast()
|
| Modifier and Type | Method |
|---|---|
Date |
add(Timespan timeSpan)
Returns the sum of the current date / time and timeSpan as a new date
|
|
addDays(IntNumber val)
Adds the number of days to the current date and returns a new date
|
|
addHours(IntNumber val)
Adds the number of hours to the current date and returns a new date
|
|
addMinutes(IntNumber val)
Adds the number of minutes to the current date and returns a new date
|
Date |
addMonths(IntNumber val)
Adds the number of months to the current date and returns a new date
|
|
addSeconds(IntNumber val)
Adds the number of seconds to the current date and returns a new date
|
Date |
addYears(IntNumber val)
Adds the number of years to the current date and returns a new date
|
Date |
clone()
Returns a copy
|
BoolValue |
equal(Date date)
Returns the true if the date / time equals to date
|
BoolValue |
less(Date date)
Returns the true if the date / time is earlier than date
|
Timespan |
subtract(Date dt)
Returns the difference of the date / time and dt as an interval
|
Date |
subtract(Timespan timeSpan)
Returns the difference of the date / time and timeSpan as a date
|
String |
toPrintable()
Returns the string representation of the date as a short date and time
|
public class SystemTime
An system time
| Modifier and Type | Field |
|---|---|
|
_value
|
| Modifier and Type | Constructor / Static Method |
|---|---|
SystemTime |
constructor(LongNumber value)
Initializes a system time with the number of 100-nanosecond intervals since January 1, 1601 (UTC)
|
SystemTime |
constructor(SystemTime value)
Creates a copy of the system time
|
internal SystemTime |
loadAsTimespan(IntNumber days, IntNumber hours, IntNumber minutes, IntNumber seconds)
|
| Modifier and Type | Static Property |
|---|---|
get SystemTime |
Default()
Returns a default system time
|
| Modifier and Type | Property |
|---|---|
get LongNumber |
Value()
Returns the system time as a number of 100-nanosecond intervals since January 1, 1601
|
| Modifier and Type | Method |
|---|---|
SystemTime |
add(SystemTime operand)
Returns a sum of the system time and operand
|
BoolValue |
equal(SystemTime operand)
Returns true if the system time equals to operand
|
BoolValue |
less(SystemTime operand)
Returns true if the system time less than operand
|
SystemTime |
subtract(SystemTime operand)
Returns a difference between the system time and operand
|
public singleton systemTimeFactory
| Modifier and Type | Method |
|---|---|
SystemTime |
getNow()
|
SystemTime |
getUtcNow()
|
public class Timespan
A time interval
| Modifier and Type | Field |
|---|---|
SystemTime |
_value
|
| Modifier and Type | Constructor / Static Method |
|---|---|
Timespan |
constructor()
Creates a zero interval
|
Timespan |
constructor(SystemTime val)
Converts a system time to an interval
|
Timespan |
new(IntNumber hours, IntNumber minutes, IntNumber seconds)
Initializes an interval
|
Timespan |
new(IntNumber days, IntNumber hours, IntNumber minutes, IntNumber seconds)
Initializes an interval
|
| Modifier and Type | Static Property |
|---|---|
get Timespan |
Default()
Returns a zero interval
|
get Timespan |
MinValue()
Returns a zero interval
|
| Modifier and Type | Property |
|---|---|
get IntNumber |
Days()
Gets the days component of the time interval represented by the interval
|
get IntNumber |
Hours()
Gets the hours component of the time interval represented by the interval
|
get LongNumber |
Milliseconds()
Gets the milliseconds component of the time interval represented by the interval
|
get IntNumber |
Minutes()
Gets the minute component of the time interval represented by the interval
|
get IntNumber |
Seconds()
Gets the seconds component of the time interval represented by the interval
|
get SystemTime |
SystemTime()
Returns the interval as a system time
|
| Modifier and Type | Method |
|---|---|
Date |
add(Date date)
Adds the interval to the provideddate and returns a new date
|
Timespan |
add(Timespan span)
Returns the sum of the interval and span
|
Timespan |
clone()
Returns the copy of the interval
|
BoolValue |
equal(Timespan span)
Returns the true if the interval equals to span
|
BoolValue |
isEmpty()
Returns true if the interval is zero
|
BoolValue |
less(Timespan span)
Returns the true if the interval is less than span
|
Timespan |
subtract(Timespan span)
Returns the difference betwen the interval and span
|
String |
toPrintable()
Returns a string representation of the interval
|
public class TimeStruct
A date / time structure
| Modifier and Type | Field |
|---|---|
ShortNumber |
_year
|
ShortNumber |
_month
|
ShortNumber |
_dayOfWeek
|
ShortNumber |
_day
|
ShortNumber |
_hour
|
ShortNumber |
_minute
|
ShortNumber |
_second
|
ShortNumber |
_millisecond
|
| Modifier and Type | Constructor / Static Method |
|---|---|
TimeStruct |
constructor(SystemTime time)
Initializes the date/time structure by a system time
|
TimeStruct |
constructor()
Creates an empty structure
|
| Modifier and Type | Property |
|---|---|
get IntNumber |
Day()
A day component of the date/time structure
|
set |
Day(IntNumber value)
A day component of the date/time structure
|
get IntNumber |
DayOfWeek()
A day of week component of the date/time structure
|
get IntNumber |
Hour()
An hour component of the date/time structure
|
set |
Hour(IntNumber value)
An hour component of the date/time structure
|
get IntNumber |
Millisecond()
A millisecond component of the date/time structure
|
set |
Millisecond(IntNumber value)
A millisecond component of the date/time structure
|
get IntNumber |
Minute()
An minute component of the date/time structure
|
set |
Minute(IntNumber value)
An minute component of the date/time structure
|
get IntNumber |
Month()
A month component of the date/time structure
|
set |
Month(IntNumber value)
A month component of the date/time structure
|
get IntNumber |
Second()
A second component of the date/time structure
|
set |
Second(IntNumber value)
A second component of the date/time structure
|
get IntNumber |
Year()
A year component of the date/time structure
|
set |
Year(IntNumber value)
A year component of the date/time structure
|
| Modifier and Type | Method |
|---|---|
|
readTo(ref SystemTime retVal)
Converts the date / time structure into a system time
|
WideString |
toShortDate()
Returns a short date representation of the date / time structure
|
String |
toShortDate(ref String arg1)
Returns a short date representation of the date / time structure
|
WideString |
toShortTime()
Returns a short time representation of the date / time structure
|
String |
toShortTime(ref String arg1)
Returns a short time representation of the date / time structure
|