views:

55

answers:

2

Hi,

I've been working a lot with dates and various capacities for the past month. I can't seem to find any decent documentation on working with dates in javascript.

for example: PHPfreaks has a wonderful explanation of any and all date() functions.

I just want to make sure I am properly utilizing all of the date object's methods.

W3schools has the best explanation that i've found.

So i'm taking the opportunity to utilize SO -

  1. What are the methods attached to the date object? (found @ w3schools)
  2. If you are inclined, list any interesting or useful scripts with the date obj (including odd behavior)
+2  A: 

I found the w3schools link to be helpful. I think it does list all date methods, including getMonth().

One odd behavior thing to take note of is that getMonth returns the month in terms 0-11, where getDate returns day of the month 1-31, so when using getMonth you need to know to add 1 if you want the month in terms 1-12.

rosscj2533
aha! I had a feeling I wasn't viewing the full date Object description in w3schools. very good.
Derek Adair
I edited my question to include the proper w3schools link. thanks again. I'd still like to check out some interesting scripts/odd functionalities w/ the date object =)
Derek Adair