|
Get
Year
Returns
the year of the date object, according to the
local time. The year displayed will be year -
1900.
Syntax
:
variable.get year ( );
Example
:
on (press)
{
a = new date ( );
b = a.get year( );
}
where
a is instance of date holding the current date
(i.e. 2001/17/10)
b will hold value "01" (i.e. 2001-1900)
The
last two digit of the year will be displayed,
if getyear command is used.
Get
Full Year
Returns the full year of the specified date, according
to the local time.
Syntax
:
variable .get full year ( );
Example
:
a = new date ( );
b = a.getfull year ( );
where
value of a be 2001/07/10
value of b will be "2001"
since
get full year function will not display the last
two digits, but it will give the full year (i.e.
2001).
Get
Month
This command returns the month from the date object
according to the local time.
Syntax
:
variable.getmonth ( );
Example
:
a = new date ( );
b = a.getmonth( );
where the variable a holds 2001/07/10 (year, month,
date, hour, minute, sec, milli sec)
the variable b holds "10", the date
will be displayed in the format (year/month/date).
|