Date and time

Let now = new Date();
alert( now ); // shows current date/time

It stores the date, time and provides methods for date/time management.

Access date components.

  • GetFullYear() : Get the year (4 digits).
  • GetMonth() : Get the month, from 0 to 11.
  • GetDate() : Get the day of month, from 1 to 31, the name of the method does look a little bit strange.
  • GetHours(), getMinutes(), getSeconds(), getMilliseconds() : Get the corresponding time components.

Date and time — Structure map

Clickable & Draggable!

Date and time — Related pages: