When a Date object is created, a number of methods allow you to operate on it. Date methods allow you to get and set the year, month, day, hour, minute, second, and millisecond of objects, using either local time or UTC (universal, or GMT) time. More about date methods later.
When you display a date object in HTML, it is automatically converted to a string, regardless if the toString() method is used or not: