Curious - how do I work with week numbers for last year??

32 views
Skip to first unread message

Knoxville1356

unread,
Oct 31, 2010, 3:33:04 PM10/31/10
to Datejs - A JavaScript Date Library
I have a data source that outputs dates in week numbers. "W01", "W02",
"W03" etc. Datejs handles this fine for the current year, but I cannot
make it show dates from a specific year..

If I try:
Date.parse("W01")
this works, and gives me:
Monday, January 04, 2010 12:00:00 AM

Same with another week:
Date.parse("W04")
equals:
Monday, January 25, 2010 12:00:00 AM

But, if I try to add Year to this, it completely ignores it, and still
displays everything in 2010.
Date.parse("W04 2009")
Date.parse("2009 W04")

etc.

no matter what I try, it always shows 2010...

Anyone got any ideas for how to work around this problem?

Reply all
Reply to author
Forward
0 new messages