JavaScript - Date

Javascript Date is a built-in object that provides methods for working with dates and times. It allows you to create, parse, manipulate and format dates and times. You can create a new Date object by calling its constructor with new Date() and passing a date string, timestamp or no arguments to it.

The Date object provides several methods to get various date and time values such as getFullYear, getMonth, getDate, getHours, getMinutes, getSeconds, and getTime. It also provides methods to set date and time values such as setFullYear, setMonth, setDate, setHours, setMinutes, setSeconds, and setTime.

The Date object also provides methods for formatting dates and times as strings, such as toDateString, toTimeString, and toLocaleString.

Javascript Date object uses a time value that is relative to the UTC time zone, so it is important to consider time zones and Daylight Saving Time when working with dates and times.