But makes working with dates in most controls very easy :)

On Mon, Mar 31, 2008 at 2:20 PM, jmfillman <[EMAIL PROTECTED]> wrote:

>   Thank you Alex. I knew that, but obviously can't count starting at
> zero :-) Took my a while to also catch that since April only has 30
> days, it went to May 1st.
>
> It sure makes it unnecessarily difficult in working with dates in
> DB's that consider January month 1.
>
>
> --- In [email protected] <flexcoders%40yahoogroups.com>, "Alex
> Harui" <[EMAIL PROTECTED]> wrote:
> >
> > For some strange reason, month is zero-based.
> >
> >
> >
> > ________________________________
> >
> > From: [email protected] <flexcoders%40yahoogroups.com>
> [mailto:[email protected] <flexcoders%40yahoogroups.com>] On
> > Behalf Of jmfillman
> > Sent: Monday, March 31, 2008 9:57 AM
> > To: [email protected] <flexcoders%40yahoogroups.com>
> > Subject: [flexcoders] Date Bug??
> >
> >
> >
> > When I run the code below, I get a date of May 1st, 2008. What am I
> > missing here? Shouldn't this give me March 31st, 2008.
> >
> > <?xml version="1.0"?>
> > <!-- Simple example to demonstrate NumberFormatter. -->
> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
> > <http://www.adobe.com/2006/mxml> "
> > creationComplete="initDate()">
> > <mx:Script>
> > <![CDATA[
> > private var year:Number = 2008;
> > private var month:Number = 3;
> > private var date:Number = 31;
> > private var wholeDate:Date = new Date(year, month, date);
> >
> > private function initDate():void{
> > myText.text = wholeDate.toString();
> > }
> > ]]>
> > </mx:Script>
> > <mx:Text width="466" id="myText"/>
> > </mx:Application>
> >
>
>  
>

Reply via email to