开发者

AS3 Date problem

开发者 https://www.devze.com 2023-01-22 05:40 出处:网络
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.

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

精彩评论

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