The Date object can represent dates 285,616 years before and after January 1, 1970
A date Object is created by using a new operator along with the Date constructor
If a Date Constructor is created without any arguments, the date object created gets only the current date and time.
To get date based on another date and time, the millisecond representation of the date is passed as an argument.
The Date.parse() method is used to pass a string argument representing a date, it converts the date string into a millisecond representation of the date.
The date object stores the date in milliseconds, which is difficult for every day use, hence it needs to be converted to days, hours or minutes.
The below demo calculates the days remaining for new year in milliseconds and then converts them to days.
The prototype property is used to add more properties and methods to Date object
By making use of Date objects prototype property, you can customize the values of time and date