Re: Interesting code in DateField

2013-04-18 Thread Justin Mclean
Hi, > I guess it's assuming all years are 4 digit and not 2 digit. You might think so but the year can be a 2 or 4 digits string at this point. I think there is some confusion there with the 1 Jan 1970 date (as you pointed out) but it's for the wrong reason :-) Thanks, Justin

RE: Interesting code in DateField

2013-04-18 Thread Kessler CTR Mark J
n the year 2000? -Mark -Original Message- From: Justin Mclean [mailto:jus...@classsoftware.com] Sent: Thursday, April 18, 2013 12:29 AM To: dev@flex.apache.org Subject: Interesting code in DateField Hi, Funny little assumption in DateField's stringToDate function: if (ye

Interesting code in DateField

2013-04-17 Thread Justin Mclean
Hi, Funny little assumption in DateField's stringToDate function: if (yearString.length == 2 && yearNum < 70) yearNum+=2000; So if you enter a two digit year 70 or above it thinks it's 1st century AD (?) and below 70 and it's the 21st century! Just what you need for date of