|
October 21, 1999 What Day were you Born on? Tips: October 1999
Yehuda Shiran, Ph.D.
|
|
The Date object is one of the more powerful objects in JavaScript. It supports several methods to set and get different portions of the date description. Let's take an example that computes the day of the week of your birthday:
Notice that Sunday is the first day of the week and its index is 0. Similarly, the first month of the year is January and its numeric value is 0 as well. The following script sets the year, month, and date of the month:
People who read this tip also read these tips: Look for similar tips by subject: |