Class are destined to control of date and time values.
DateTimeNew([<nYear>,[<nMonth>,[<nDay>,[<nHour>[,<nMin>[,<nSec>[,<nMsec>]]]]]]]) --> DATETIME object
ADD | Addition two DateTime date-object |
DATE | Gets date values. |
DATETIMENEW | DATETIME object constructor. |
DAY | Gets day value. |
HOUR | Gets hour value. |
MIN | Gets minutes value. |
MONTH | Gets month value. |
MSEC | Gets millisecundes value. |
NORMALIZE | Normalize object DATETIME. |
SEC | Gets secundes value. |
SUB | Subtraction two DateTime date-object |
TIME | Gets the string in time format. |
YEAR | Gets year value. |
/* Create */ dt := DateTimeNew(2003, 01, 01) // ? dt:Year() // --> 2003 ? dt:Month() // --> 01 ? dt:Day() // --> 01 dt := DateTimeNew() ? dt:Year() // --> 0 ? dt:Month() // --> 0 ? dt:Day() // --> 0 ? dt:Date() // --> 02-12-0001 dt := DateTimeNew(2000) ? dt:Year() // --> 2000 ? dt:Month() // --> 0 ? dt:Day() // --> 0 ? dt:Date() // --> 30-11-1999 /* Normalize */ dt := DateTimeNew(2003, 03, 41) ? dt:Day() // --> 41 ? dt:Normalize() // --> DateTime object ? dt:Day() // --> 10 ? dt:Date() // --> 10-04-2003 dt := DateTimeNew(0, 0, 0) ? dt:Year() // --> 0 ? dt:Month() // --> 0 ? dt:Day() // --> 0 ? dt:Normalize() // --> DateTime object ? dt:Year() // --> 0001 ? dt:Month() // --> 12 ? dt:Day() // --> 02 ? dt:Date() // --> 02-12-0001 /* Control */ dt := DateTimeNew(2003, 03, 01) ? dt:Year() // --> 2003 ? dt:Month() // --> 03 ? dt:Day() // --> 01 dt2 := DateTimeNew(0, 0, 54) dt:Add(dt2) ? dt:Year() // --> 2003 ? dt:Month() // --> 03 ? dt:Day() // --> 55 ? dt:Date() // --> 24-04-2003 dt := DateTimeNew(2003, 03, 01) ? dt:Year() // --> 2003 ? dt:Month() // --> 03 ? dt:Day() // --> 01 dt2 := DateTimeNew(0, 0, 54) dt:Sub(dt2) ? dt:Year() // --> 2003 ? dt:Month() // --> 03 ? dt:Day() // --> -53 ? dt:Date() // --> 06-01-2003
No dependies of platform.
Addition two DateTime date-object
Add(<oDt>) --> <oDateTime>
No arguments
Returns object DATETIME.
Add() addes <oDt> to DDATETIME-data and returns some one witch increased data. New DATETIME-data is't normalize.
Gets date values.
Date() --> <dData>
No arguments
Returns <Data> value as date value.
Date() converts DATETIME data value to normal calendar date and returns it as date values.
DATETIME object constructor.
DateTimeNew([<nYear>,[<nMonth>,[<nDay>,[<nHour>[,<nMin>[,<nSec>[,<nMsec>]]]]]]]) --> DATETIME object
Method returns new DATETIME object.
DateTimeNew() is constructs and returns new DATETIME object. That class can be used to control date and time values.
If some parameters not specified then date set to zero-date.
Attention! Object contain not normalized date.
Gets day value.
Day() --> <nDay>
No arguments
Returns the numeric value specified day value.
Day() returns day of the specified <Data> as numeric value. Not normalized.
Gets hour value.
Hour() --> <nHour>
No arguments
Returns the numeric value specified hour value.
Hour() returns hour of the specified <Data> as numeric value. Not normalized.
Gets minutes value.
Min() --> <nMin>
No arguments
Returns the numeric value specified minutes value.
Min() returns minutes of the specified <Data> as numeric value. Not normalized.
Gets month value.
Month() --> <nMonth>
No arguments
Returns the numeric value specified month value.
Month() returns month of the specified <Data> as numeric value. Not normalized.
Gets millisecundes value.
Msec() --> <nMsec>
No arguments
Returns the numeric value specified millisecundes value.
Msec() returns millisecundes of the specified <Data> as numeric value. Not normalized.
Normalize object DATETIME.
Normalize() --> <oDateTime>
No arguments
Returns normalized object DATETIME.
Normalize() converts DATETIME-data to normal calendar date and returns some one object.
Gets secundes value.
Sec() --> <nSec>
No arguments
Returns the numeric value specified secundes value.
Sec() returns secundes of the specified <Data> as numeric value. Not normalized.
Subtraction two DateTime date-object
Sub(<oDt>) --> <oDateTime>
No arguments
Returns object DATETIME.
Sub() subtracts <oDt> from DATETIME-data and returns some one witch decreased data. New DATETIME-data is't normalize. </para>
Gets the string in time format.
Time() --> <sTime>
No arguments
Returns the string in time format.
Time() returns the normalized time value of the specified <Data> as string value in the format <hh:mm:ss:ms> or returns "00:00:00:00" if DateTime object contained zero-date. When <hh> is two-digit hours value, <mm> is two-digit minutes value, <ss> is two-digit secundes value and <ms> is two-digit milisecundes value.
Gets year value.
Year() --> <nYear>
No arguments
Returns the numeric value specified year value.
Year() returns year of the specified <::Data> as four-digit numeric value. Not normalized.