VaR mydate = new date ();
Mydate. getyear (); // obtain the current year (2 digits)
Mydate. getfullyear (); // obtain the complete year (4 bits, 1970 -????)
Mydate. getmonth (); // obtain the current month (0-11, 0 represents January)
Mydate. getdate (); // obtain the current day (1-31)
Mydate. getday (); // obtain X of the current week (0-6, 0 indicates Sunday)
Mydate. gettime (); // obtain the current time (milliseconds starting from 1970.1.1)
Mydate. gethours (); // obtain the current hour (0-23)
Mydate. getminutes (); // obtain the current number of minutes (0-59)
Mydate. getseconds (); // obtain the current number of seconds (0-59)
Mydate. getmilliseconds (); // obtain the current number of milliseconds (0-999)
Mydate. tolocaledatestring (); // obtain the current date
VaR mytime = mydate. tolocaletimestring (); // obtain the current time
Mydate. tolocalestring (); // obtain the date and time