开发者

AS3 Date problem

Any idea why the day is coming out wrong when the date is accurate?

I'm debugging and I can see the date variables which are correct but the day is wrong.

date Date (@9f14161) date 26 [0x1a]

dateUTC 26 [0x1a]

day 5

dayUTC 5

fullYear 2010 [0x7da]

fullYearUTC 2010 [0x7da]

hours 17 [0x11]

hoursUTC 17 [0x11]

milliseconds 0

millisecondsUTC 0

minutes 0

minutesUTC 0

month 10 [0xa]

mon开发者_Python百科thUTC 10 [0xa]

seconds 0

secondsUTC 0

time 1290790800000 [0x12c89208a80]

timezoneOffset 0

That is my date variables, as you can see, The date is 26 (today), month is 10 (this month) and the year is 2010 (this year) yet the day is coming out at 5 which is a friday.


The month begins with 0, so a month with the value 10 is not october but november. So friday (day = 5) is correct in your example.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜