that's great

thanks for all your help guys

because i'm using as2, i've decided to go with the
Date.getTime()/Date.setTime() and get the serverside devs to spit out the
number in milliseconds using time() (possibly *1000) as i can pass that
straight to the Date object and let that work everything out for me.



On Tue, Aug 26, 2008 at 2:37 PM, Mark Walters
<[EMAIL PROTECTED]>wrote:

> This is a good format to follow for date and time in XML:
> http://www.w3.org/TR/NOTE-datetime .
>
> Eg:
>
>   Year:
>      YYYY (eg 1997)
>   Year and month:
>      YYYY-MM (eg 1997-07)
>   Complete date:
>      YYYY-MM-DD (eg 1997-07-16)
>   Complete date plus hours and minutes:
>      YYYY-MM-DDThh:mmTZD (eg 1997-07-16T19:20+01:00)
>   Complete date plus hours, minutes and seconds:
>      YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)
>   Complete date plus hours, minutes, seconds and a decimal fraction of a
> second
>      YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00)
>
> where:
>
>     YYYY = four-digit year
>     MM   = two-digit month (01=January, etc.)
>     DD   = two-digit day of month (01 through 31)
>     hh   = two digits of hour (00 through 23) (am/pm NOT allowed)
>     mm   = two digits of minute (00 through 59)
>     ss   = two digits of second (00 through 59)
>     s    = one or more digits representing a decimal fraction of a second
>     TZD  = time zone designator (Z or +hh:mm or -hh:mm)
>
> There's even a method in the DateUtil class included in the AS3CoreLib that
> parses this format.
>
> - Mark
>
>
> On Tue, Aug 26, 2008 at 5:48 AM, allandt bik-elliott (thefieldcomic.com) <
> [EMAIL PROTECTED]> wrote:
>
> > hi guys
> >
> > i'm speccing an xml file for a server side dev that needs to return a
> > target
> > date and time and i wanted to make sure i wasn't doing anything stupid
> >
> > what would a php dev be expecting to use for time / date and how would
> that
> > be supplied in an xml file? And what would the best way of converting the
> > return string for flash to use?
> >
> > I was thinking something along the lines of
> > <data date="2008,08,26" time="12,0,0" />
> >
> > and using something like
> >
> > var sDate:String = node.attributes.date;
> > var sTime:String = node.attributes.time;
> >
> > var arDate:Array = sDate.split(",");
> > var nYear:Number = Number(arDate[0]);
> > var nMonth:Number = Number(arDate[1]-1); // months start at 0
> > var nDate:Number = Number(arDate[2]);
> >
> > var arTime:Array = sTime.split(",");
> > var nTimeHours:Number = Number(arTime[0]);
> > var nTimeMinutes:Number = Number(arTime[1]);
> > var nTimeSeconds:Number = Number(arTime[2]);
> >
> > var targetDate:Date = new Date(nYear, nMonth, nDate, nTimeHours,
> > nTimeMinutes, nTimeSeconds);
> > _______________________________________________
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to