Wednesday, May 9, 2007

Do you count months from 0 to 11 ???

Just to let you know that for some strange reason Flex dates are a bit 'unusual' (at least to .NET developers like me). When checking the 'month' property of a date it's 1 less than the actual month. Why? Flex assigns 0 to January, 1 to February, 2 to March, ... Easy to get around but rather 'silly', no?

Another unusual thingie is the fact that you need to use the 'date' (!) property in order to get the number of the day in the month (and in this case it is NOT 0-based...).

I assume it's to trick people when doing the brand new Flex2 certification exam :)

No comments: