You should be able to determine minDate and maxDate by calling new Date(Number.MIN_VALUE) and new Date(Number.MAX_VALUE). -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com
-----Original Message----- From: Gregory Kelley <gkel...@pngmail.com> Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Valid Date Ranges in Flex Date: Wed, 14 Jan 2009 10:30:50 -0500 <sheepish grin> I knew that at some point in the past. Now that you say that it is very obvious. In my attempt to determine the earliest/latest date supported I tried the following but then all the date parts in the object are NaN. public static const MIN_DATE:Date = new Date(-Number.MAX_VALUE); public static const MAX_DATE:Date = new Date(Number.MAX_VALUE); Thanks, Greg ________________________________________________________________________ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Wednesday, January 14, 2009 10:12 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Valid Date Ranges in Flex The month ranges from 0 (January) to 11 (December). You asked for day 31 of month 12 of year 2999 so Flex made it day 31 of month 1 of year 3000. --- In flexcoders@yahoogroups.com, "Gregory Kelley" <gkel...@...> wrote: > > In creating a date filterd report generation system, I was asked to add an option for returning all data. Rather than reworking the backend I just added a checkbox to the UI that says return all data. If that box is checked then the properties return the following constants (randomely created by yours truly as I couldn't determine from docs what was valid). > > public static const MIN_DATE:Date = new Date(1500,1,1); > public static const MAX_DATE:Date = new Date(2999,12,31); > > Here is the interesting part those dates actually return the following data. > MIN_DATE.toString = Thu Feb 1 00:00:00 GMT-0500 1500 > MAX_DATE.toString = Fri Jan 31 00:00:00 GMT-0500 3000 > > The first evaluation makes sense the second one is a bit more confusing. > I would expect if the date I assign is too big that the date returned would be earlier not in the future. > > Anyone know what the valid range is? > > Thanks for your time, > Greg >