JavaScript date and time. Object Time Date

JavaScript Object Date - work with date and time


Description of the lesson:

? Date of commencement of the era of UNIX.

? Creating a new object date and time during the execution, by the hour local time computer user.

? Creation of a specific date.

? Output of the date object directly and automatically convert to a string.

? Create an object from the date of recording the date of different options, as well as of the date of past and future time.

? Method Date.parse ().

? Getting timestamp in milliseconds from the date.

? Getting the date of presentation time stamps in milliseconds.

? Creating a timestamp without creating a date object.

? The difference Date.parse () from the new Date ().

? Comparison of Date.parse (new Date ()) and a new Date (). GetTime ().

? Comparison of new Date () and new Date (). SetTime ().

? Examples.


? Methods for conversion to a single line of several values \u200b\u200bfrom the object date / time.

? Getting immediately executed line consisting of several date and time settings.

? Conversion in accordance with the regional and language settings of the user.


? methods for individual component values \u200b\u200bin the form of time.

? Getting the number of milliseconds since epoch of unix, the creation timestamp of a date object in milliseconds.

? Getting a timestamp, the number of seconds since the epoch unix.

? Year 2014 in the format of the object a specific date.

? Month number from 0 to 11 of the object a specific date.

? The number of the month from 1 to 31 of the object a specific date.

? Number of the day of the week from 0 (Sunday) to 6 (Saturday) from an specific date.

? Example: Preparation day of the week, which will be January 1, 2012.

? Watch, a number from 0 to 23 from the object specific date.

? Minutes of from 0 to 59 from the object specific date.

? Second, a number from 0 to 59 from the object specific date.

? Milliseconds, a number from 0 to 999 from the object of a specific date.


? The method allows to change in the previously created Date object individual components.

? Changing the date of an existing object of the timestamp given in milliseconds.

? The total (across) the date of milliseconds.

? Changing the subject, in particular date.

? Changing the number of the month from 0 to 11.

? Changing the day of the month from 1 to 31 in the object specific date.

? Changing the number of hours from 0 to 23 in the object specific date.

? Automatic recalculation date to a new date.

? Changing the number of minutes from 0 to 59 in the object specific date.

? Changing the number of seconds from 0 to 59 in the object specific date.

? Changing the number of milliseconds from 0 to 999 in the object specific date.


? UTC-options practices.

? The date and time for local time zone and UTC-variants of these methods.

? If your local time is shifted relative to UTC.

? The clock in your area for the date.

? The clock in the zone GMT + 0 for the date.

? The difference between the local and UTC-time.