//27 <- today day number
new Dat开发者_高级运维e().getDay() = new Date().getUTCDay() //<- 5 (friday)? what?
Do I have to parse the result with .toString()
or use something like YUI.Date.format()
?
You're looking for .getDate()
:
new Date().getDate();
.getDay()
returns the day number 0 (Sunday) to 6 (Saturday).
The one you are looking for is .getDate()
, not .getDay()
Date Object Reference
You should use
new Date().getDate()
getDay and getUTCDay returns the number of the weekday. You need getDate() and etUTCDate()
精彩评论