Since the idea of a date and time being a convenient display for computer users was someone's brainchild, programmers have been at the end of their tether trying to standardize it for operating systems like Windows. Apart from the many time zones, it seems that the way in which the date and time are displayed can be enough to irritate a user. In this article you'll learn how to do it without too much trouble thanks to the date() object.
Using the Date() Object to Create a Clock (Page 1 of 4 )
Date Object Methods
It seems that most people want to be conscious of the date and time. There is almost an obsession to it that needs to be satisfied. So it was no surprise when operating systems began to display the time on the user's desktop so they do not miss their favorite TV show while killing time on the computer.
dateToday = new Date()
getDate() - day of the month getDay() - day of the week getHours() - the hours getMinutes() - the minutes getSeconds() - the seconds getMonth() - the month getFullYear() - the four digit year
Then there is the ability to assign values:
setDay() - set the day setHours() - set the hours setMinutes() - set the minutes setSeconds() - set the seconds setMonth() - set the month setFullYear() - set the 4 digit year
There are a host of other functions. For this article and its purpose, this will help the coder wanting to come to grips with the Date() object.