[Flashcoders] is there a recognised date format for xml?

2008-08-26 Thread allandt bik-elliott (thefieldcomic.com)
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


RE: [Flashcoders] is there a recognised date format for xml?

2008-08-26 Thread Cor
In PHP you can do whatever you want: see http://nl.php.net/date
I think it can also depend on your server.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of allandt
bik-elliott (thefieldcomic.com)
Sent: dinsdag 26 augustus 2008 11:48
To: Flash Coders List
Subject: [Flashcoders] is there a recognised date format for xml?

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


Re: [Flashcoders] is there a recognised date format for xml?

2008-08-26 Thread Kenneth Kawamoto
If so I'd ask my PHP coder to generate formatted string so that I need 
to code less ;)


e.g.
var xml:XML = data date=Tue Aug 26 12:00:00 GMT 2008 /
var targetDate:Date = new Date([EMAIL PROTECTED]());

...a lot less code than yours!

Kenneth Kawamoto
http://www.materiaprima.co.uk/

Cor wrote:

In PHP you can do whatever you want: see http://nl.php.net/date
I think it can also depend on your server.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of allandt
bik-elliott (thefieldcomic.com)
Sent: dinsdag 26 augustus 2008 11:48
To: Flash Coders List
Subject: [Flashcoders] is there a recognised date format for xml?

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


RE: [Flashcoders] is there a recognised date format for xml?

2008-08-26 Thread Cor
Yes, but still it is depending of the localtime.

Trace(targetDate); gives me in the Netherlands: Tue Aug 26 12:00:00 GMT+0200
2008



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kenneth
Kawamoto
Sent: dinsdag 26 augustus 2008 12:22
To: Flash Coders List
Subject: Re: [Flashcoders] is there a recognised date format for xml?

If so I'd ask my PHP coder to generate formatted string so that I need 
to code less ;)

e.g.
var xml:XML = data date=Tue Aug 26 12:00:00 GMT 2008 /
var targetDate:Date = new Date([EMAIL PROTECTED]());

...a lot less code than yours!

Kenneth Kawamoto
http://www.materiaprima.co.uk/

Cor wrote:
 In PHP you can do whatever you want: see http://nl.php.net/date
 I think it can also depend on your server.
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of allandt
 bik-elliott (thefieldcomic.com)
 Sent: dinsdag 26 augustus 2008 11:48
 To: Flash Coders List
 Subject: [Flashcoders] is there a recognised date format for xml?
 
 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


Re: [Flashcoders] is there a recognised date format for xml?

2008-08-26 Thread Kenneth Kawamoto

Isn't that always the case no matter how you construct the date object?

Kenneth Kawamoto
http://www.materiaprima.co.uk/

Cor wrote:

Yes, but still it is depending of the localtime.

Trace(targetDate); gives me in the Netherlands: Tue Aug 26 12:00:00 GMT+0200
2008



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kenneth
Kawamoto
Sent: dinsdag 26 augustus 2008 12:22
To: Flash Coders List
Subject: Re: [Flashcoders] is there a recognised date format for xml?

If so I'd ask my PHP coder to generate formatted string so that I need 
to code less ;)


e.g.
var xml:XML = data date=Tue Aug 26 12:00:00 GMT 2008 /
var targetDate:Date = new Date([EMAIL PROTECTED]());

...a lot less code than yours!

Kenneth Kawamoto
http://www.materiaprima.co.uk/

Cor wrote:

In PHP you can do whatever you want: see http://nl.php.net/date
I think it can also depend on your server.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of allandt
bik-elliott (thefieldcomic.com)
Sent: dinsdag 26 augustus 2008 11:48
To: Flash Coders List
Subject: [Flashcoders] is there a recognised date format for xml?

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


RE: [Flashcoders] is there a recognised date format for xml?

2008-08-26 Thread Cor
Mmmm, I don't know??
Somebody out there who does???

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kenneth
Kawamoto
Sent: dinsdag 26 augustus 2008 12:43
To: 'Flash Coders List'
Subject: Re: [Flashcoders] is there a recognised date format for xml?

Isn't that always the case no matter how you construct the date object?

Kenneth Kawamoto
http://www.materiaprima.co.uk/

Cor wrote:
 Yes, but still it is depending of the localtime.
 
 Trace(targetDate); gives me in the Netherlands: Tue Aug 26 12:00:00
GMT+0200
 2008
 
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth
 Kawamoto
 Sent: dinsdag 26 augustus 2008 12:22
 To: Flash Coders List
 Subject: Re: [Flashcoders] is there a recognised date format for xml?
 
 If so I'd ask my PHP coder to generate formatted string so that I need 
 to code less ;)
 
 e.g.
 var xml:XML = data date=Tue Aug 26 12:00:00 GMT 2008 /
 var targetDate:Date = new Date([EMAIL PROTECTED]());
 
 ...a lot less code than yours!
 
 Kenneth Kawamoto
 http://www.materiaprima.co.uk/
 
 Cor wrote:
 In PHP you can do whatever you want: see http://nl.php.net/date
 I think it can also depend on your server.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of allandt
 bik-elliott (thefieldcomic.com)
 Sent: dinsdag 26 augustus 2008 11:48
 To: Flash Coders List
 Subject: [Flashcoders] is there a recognised date format for xml?

 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


Re: [Flashcoders] is there a recognised date format for xml?

2008-08-26 Thread allandt bik-elliott (thefieldcomic.com)
hmm - this is actually an as2 class so i wouldn't be able to use
toXMLString() - is there anything similar i can use, do you think?

a

On Tue, Aug 26, 2008 at 11:28 AM, Cor [EMAIL PROTECTED] wrote:

 Yes, but still it is depending of the localtime.

 Trace(targetDate); gives me in the Netherlands: Tue Aug 26 12:00:00
 GMT+0200
 2008



 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth
 Kawamoto
 Sent: dinsdag 26 augustus 2008 12:22
 To: Flash Coders List
 Subject: Re: [Flashcoders] is there a recognised date format for xml?

 If so I'd ask my PHP coder to generate formatted string so that I need
 to code less ;)

 e.g.
 var xml:XML = data date=Tue Aug 26 12:00:00 GMT 2008 /
 var targetDate:Date = new Date([EMAIL PROTECTED]());

 ...a lot less code than yours!

 Kenneth Kawamoto
 http://www.materiaprima.co.uk/

 Cor wrote:
  In PHP you can do whatever you want: see http://nl.php.net/date
  I think it can also depend on your server.
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of allandt
  bik-elliott (thefieldcomic.com)
  Sent: dinsdag 26 augustus 2008 11:48
  To: Flash Coders List
  Subject: [Flashcoders] is there a recognised date format for xml?
 
  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


Re: [Flashcoders] is there a recognised date format for xml?

2008-08-26 Thread allandt bik-elliott (thefieldcomic.com)
this also needs to be used in a countdown - so i could maybe get the server
to give it's current time and the target time and countdown between the 2?

a

On Tue, Aug 26, 2008 at 11:43 AM, Kenneth Kawamoto 
[EMAIL PROTECTED] wrote:

 Isn't that always the case no matter how you construct the date object?


 Kenneth Kawamoto
 http://www.materiaprima.co.uk/

 Cor wrote:

 Yes, but still it is depending of the localtime.

 Trace(targetDate); gives me in the Netherlands: Tue Aug 26 12:00:00
 GMT+0200
 2008



 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth
 Kawamoto
 Sent: dinsdag 26 augustus 2008 12:22
 To: Flash Coders List
 Subject: Re: [Flashcoders] is there a recognised date format for xml?

 If so I'd ask my PHP coder to generate formatted string so that I need to
 code less ;)

 e.g.
 var xml:XML = data date=Tue Aug 26 12:00:00 GMT 2008 /
 var targetDate:Date = new Date([EMAIL PROTECTED]());

 ...a lot less code than yours!

 Kenneth Kawamoto
 http://www.materiaprima.co.uk/

 Cor wrote:

 In PHP you can do whatever you want: see http://nl.php.net/date
 I think it can also depend on your server.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of allandt
 bik-elliott (thefieldcomic.com)
 Sent: dinsdag 26 augustus 2008 11:48
 To: Flash Coders List
 Subject: [Flashcoders] is there a recognised date format for xml?

 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


Re: [Flashcoders] is there a recognised date format for xml?

2008-08-26 Thread allandt bik-elliott (thefieldcomic.com)
yes it's local

On Tue, Aug 26, 2008 at 11:46 AM, Cor [EMAIL PROTECTED] wrote:

 Mmmm, I don't know??
 Somebody out there who does???

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth
 Kawamoto
 Sent: dinsdag 26 augustus 2008 12:43
 To: 'Flash Coders List'
 Subject: Re: [Flashcoders] is there a recognised date format for xml?

 Isn't that always the case no matter how you construct the date object?

 Kenneth Kawamoto
 http://www.materiaprima.co.uk/

 Cor wrote:
  Yes, but still it is depending of the localtime.
 
  Trace(targetDate); gives me in the Netherlands: Tue Aug 26 12:00:00
 GMT+0200
  2008
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth
  Kawamoto
  Sent: dinsdag 26 augustus 2008 12:22
  To: Flash Coders List
  Subject: Re: [Flashcoders] is there a recognised date format for xml?
 
  If so I'd ask my PHP coder to generate formatted string so that I need
  to code less ;)
 
  e.g.
  var xml:XML = data date=Tue Aug 26 12:00:00 GMT 2008 /
  var targetDate:Date = new Date([EMAIL PROTECTED]());
 
  ...a lot less code than yours!
 
  Kenneth Kawamoto
  http://www.materiaprima.co.uk/
 
  Cor wrote:
  In PHP you can do whatever you want: see http://nl.php.net/date
  I think it can also depend on your server.
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of allandt
  bik-elliott (thefieldcomic.com)
  Sent: dinsdag 26 augustus 2008 11:48
  To: Flash Coders List
  Subject: [Flashcoders] is there a recognised date format for xml?
 
  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


RE: [Flashcoders] is there a recognised date format for xml?

2008-08-26 Thread Cor
So what if a user (from another continent) starts your app.
The difference will be greater or even before the server time.
So you would get a negative value???

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of allandt
bik-elliott (thefieldcomic.com)
Sent: dinsdag 26 augustus 2008 12:56
To: Flash Coders List
Subject: Re: [Flashcoders] is there a recognised date format for xml?

yes it's local

On Tue, Aug 26, 2008 at 11:46 AM, Cor [EMAIL PROTECTED] wrote:

 Mmmm, I don't know??
 Somebody out there who does???

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth
 Kawamoto
 Sent: dinsdag 26 augustus 2008 12:43
 To: 'Flash Coders List'
 Subject: Re: [Flashcoders] is there a recognised date format for xml?

 Isn't that always the case no matter how you construct the date object?

 Kenneth Kawamoto
 http://www.materiaprima.co.uk/

 Cor wrote:
  Yes, but still it is depending of the localtime.
 
  Trace(targetDate); gives me in the Netherlands: Tue Aug 26 12:00:00
 GMT+0200
  2008
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth
  Kawamoto
  Sent: dinsdag 26 augustus 2008 12:22
  To: Flash Coders List
  Subject: Re: [Flashcoders] is there a recognised date format for xml?
 
  If so I'd ask my PHP coder to generate formatted string so that I need
  to code less ;)
 
  e.g.
  var xml:XML = data date=Tue Aug 26 12:00:00 GMT 2008 /
  var targetDate:Date = new Date([EMAIL PROTECTED]());
 
  ...a lot less code than yours!
 
  Kenneth Kawamoto
  http://www.materiaprima.co.uk/
 
  Cor wrote:
  In PHP you can do whatever you want: see http://nl.php.net/date
  I think it can also depend on your server.
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of allandt
  bik-elliott (thefieldcomic.com)
  Sent: dinsdag 26 augustus 2008 11:48
  To: Flash Coders List
  Subject: [Flashcoders] is there a recognised date format for xml?
 
  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

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] is there a recognised date format for xml?

2008-08-26 Thread allandt bik-elliott (thefieldcomic.com)
The app is designed for people only in the uk - it will show the current
time and the amount of time remaining until the countdown is finished so it
will probably be worth giving the time based on the server time and setting
the time in flash based on that

the original question was about the best practise for getting the time for
flash from xml

thanks for the input so far guys
a

On Tue, Aug 26, 2008 at 12:16 PM, Cor [EMAIL PROTECTED] wrote:

 So what if a user (from another continent) starts your app.
 The difference will be greater or even before the server time.
 So you would get a negative value???

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of allandt
 bik-elliott (thefieldcomic.com)
 Sent: dinsdag 26 augustus 2008 12:56
 To: Flash Coders List
 Subject: Re: [Flashcoders] is there a recognised date format for xml?

 yes it's local

 On Tue, Aug 26, 2008 at 11:46 AM, Cor [EMAIL PROTECTED] wrote:

  Mmmm, I don't know??
  Somebody out there who does???
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth
  Kawamoto
  Sent: dinsdag 26 augustus 2008 12:43
  To: 'Flash Coders List'
  Subject: Re: [Flashcoders] is there a recognised date format for xml?
 
  Isn't that always the case no matter how you construct the date object?
 
  Kenneth Kawamoto
  http://www.materiaprima.co.uk/
 
  Cor wrote:
   Yes, but still it is depending of the localtime.
  
   Trace(targetDate); gives me in the Netherlands: Tue Aug 26 12:00:00
  GMT+0200
   2008
  
  
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] On Behalf Of
 Kenneth
   Kawamoto
   Sent: dinsdag 26 augustus 2008 12:22
   To: Flash Coders List
   Subject: Re: [Flashcoders] is there a recognised date format for xml?
  
   If so I'd ask my PHP coder to generate formatted string so that I need
   to code less ;)
  
   e.g.
   var xml:XML = data date=Tue Aug 26 12:00:00 GMT 2008 /
   var targetDate:Date = new Date([EMAIL PROTECTED]());
  
   ...a lot less code than yours!
  
   Kenneth Kawamoto
   http://www.materiaprima.co.uk/
  
   Cor wrote:
   In PHP you can do whatever you want: see http://nl.php.net/date
   I think it can also depend on your server.
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] On Behalf Of
 allandt
   bik-elliott (thefieldcomic.com)
   Sent: dinsdag 26 augustus 2008 11:48
   To: Flash Coders List
   Subject: [Flashcoders] is there a recognised date format for xml?
  
   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

 ___
 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


Re: [Flashcoders] is there a recognised date format for xml?

2008-08-26 Thread Hans Wichman
Hi,

isnt milliseconds since 1970 easier?
Something like:
date value=103810313 /
new Date ().setTime(103810313))

greetz
JC

On Tue, Aug 26, 2008 at 1:33 PM, allandt bik-elliott (thefieldcomic.com) 
[EMAIL PROTECTED] wrote:

 The app is designed for people only in the uk - it will show the current
 time and the amount of time remaining until the countdown is finished so it
 will probably be worth giving the time based on the server time and setting
 the time in flash based on that

 the original question was about the best practise for getting the time for
 flash from xml

 thanks for the input so far guys
 a

 On Tue, Aug 26, 2008 at 12:16 PM, Cor [EMAIL PROTECTED] wrote:

  So what if a user (from another continent) starts your app.
  The difference will be greater or even before the server time.
  So you would get a negative value???
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of allandt
  bik-elliott (thefieldcomic.com)
  Sent: dinsdag 26 augustus 2008 12:56
  To: Flash Coders List
  Subject: Re: [Flashcoders] is there a recognised date format for xml?
 
  yes it's local
 
  On Tue, Aug 26, 2008 at 11:46 AM, Cor [EMAIL PROTECTED] wrote:
 
   Mmmm, I don't know??
   Somebody out there who does???
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] On Behalf Of
 Kenneth
   Kawamoto
   Sent: dinsdag 26 augustus 2008 12:43
   To: 'Flash Coders List'
   Subject: Re: [Flashcoders] is there a recognised date format for xml?
  
   Isn't that always the case no matter how you construct the date object?
  
   Kenneth Kawamoto
   http://www.materiaprima.co.uk/
  
   Cor wrote:
Yes, but still it is depending of the localtime.
   
Trace(targetDate); gives me in the Netherlands: Tue Aug 26 12:00:00
   GMT+0200
2008
   
   
   
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
  Kenneth
Kawamoto
Sent: dinsdag 26 augustus 2008 12:22
To: Flash Coders List
Subject: Re: [Flashcoders] is there a recognised date format for xml?
   
If so I'd ask my PHP coder to generate formatted string so that I
 need
to code less ;)
   
e.g.
var xml:XML = data date=Tue Aug 26 12:00:00 GMT 2008 /
var targetDate:Date = new Date([EMAIL PROTECTED]());
   
...a lot less code than yours!
   
Kenneth Kawamoto
http://www.materiaprima.co.uk/
   
Cor wrote:
In PHP you can do whatever you want: see http://nl.php.net/date
I think it can also depend on your server.
   
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
  allandt
bik-elliott (thefieldcomic.com)
Sent: dinsdag 26 augustus 2008 11:48
To: Flash Coders List
Subject: [Flashcoders] is there a recognised date format for xml?
   
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
 
  ___
  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

Re: [Flashcoders] is there a recognised date format for xml?

2008-08-26 Thread allandt bik-elliott (thefieldcomic.com)
would that be the same as the php time() method? because that would be super

On Tue, Aug 26, 2008 at 1:27 PM, Hans Wichman 
[EMAIL PROTECTED] wrote:

 Hi,

 isnt milliseconds since 1970 easier?
 Something like:
 date value=103810313 /
 new Date ().setTime(103810313))

 greetz
 JC

 On Tue, Aug 26, 2008 at 1:33 PM, allandt bik-elliott (thefieldcomic.com) 
 [EMAIL PROTECTED] wrote:

  The app is designed for people only in the uk - it will show the current
  time and the amount of time remaining until the countdown is finished so
 it
  will probably be worth giving the time based on the server time and
 setting
  the time in flash based on that
 
  the original question was about the best practise for getting the time
 for
  flash from xml
 
  thanks for the input so far guys
  a
 
  On Tue, Aug 26, 2008 at 12:16 PM, Cor [EMAIL PROTECTED] wrote:
 
   So what if a user (from another continent) starts your app.
   The difference will be greater or even before the server time.
   So you would get a negative value???
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] On Behalf Of
 allandt
   bik-elliott (thefieldcomic.com)
   Sent: dinsdag 26 augustus 2008 12:56
   To: Flash Coders List
   Subject: Re: [Flashcoders] is there a recognised date format for xml?
  
   yes it's local
  
   On Tue, Aug 26, 2008 at 11:46 AM, Cor [EMAIL PROTECTED] wrote:
  
Mmmm, I don't know??
Somebody out there who does???
   
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
  Kenneth
Kawamoto
Sent: dinsdag 26 augustus 2008 12:43
To: 'Flash Coders List'
Subject: Re: [Flashcoders] is there a recognised date format for xml?
   
Isn't that always the case no matter how you construct the date
 object?
   
Kenneth Kawamoto
http://www.materiaprima.co.uk/
   
Cor wrote:
 Yes, but still it is depending of the localtime.

 Trace(targetDate); gives me in the Netherlands: Tue Aug 26 12:00:00
GMT+0200
 2008



 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
   Kenneth
 Kawamoto
 Sent: dinsdag 26 augustus 2008 12:22
 To: Flash Coders List
 Subject: Re: [Flashcoders] is there a recognised date format for
 xml?

 If so I'd ask my PHP coder to generate formatted string so that I
  need
 to code less ;)

 e.g.
 var xml:XML = data date=Tue Aug 26 12:00:00 GMT 2008 /
 var targetDate:Date = new Date([EMAIL PROTECTED]());

 ...a lot less code than yours!

 Kenneth Kawamoto
 http://www.materiaprima.co.uk/

 Cor wrote:
 In PHP you can do whatever you want: see http://nl.php.net/date
 I think it can also depend on your server.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
   allandt
 bik-elliott (thefieldcomic.com)
 Sent: dinsdag 26 augustus 2008 11:48
 To: Flash Coders List
 Subject: [Flashcoders] is there a recognised date format for xml?

 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
  
   ___
   Flashcoders mailing list
   Flashcoders@chattyfig.figleaf.com
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] is there a recognised date format for xml?

2008-08-26 Thread Ashim D'Silva
If it's specifically for a countdown, you can just ask your php guy to give
you the number of seconds to the deadline (or milliseconds if you need it).
Then just divide it up however you want. Make the class nice and clean and
unrestricted.

2008/8/26 Hans Wichman [EMAIL PROTECTED]

 Hi,

 isnt milliseconds since 1970 easier?
 Something like:
 date value=103810313 /
 new Date ().setTime(103810313))

 greetz
 JC

 On Tue, Aug 26, 2008 at 1:33 PM, allandt bik-elliott (thefieldcomic.com) 
 [EMAIL PROTECTED] wrote:

  The app is designed for people only in the uk - it will show the current
  time and the amount of time remaining until the countdown is finished so
 it
  will probably be worth giving the time based on the server time and
 setting
  the time in flash based on that
 
  the original question was about the best practise for getting the time
 for
  flash from xml
 
  thanks for the input so far guys
  a
 
  On Tue, Aug 26, 2008 at 12:16 PM, Cor [EMAIL PROTECTED] wrote:
 
   So what if a user (from another continent) starts your app.
   The difference will be greater or even before the server time.
   So you would get a negative value???
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] On Behalf Of
 allandt
   bik-elliott (thefieldcomic.com)
   Sent: dinsdag 26 augustus 2008 12:56
   To: Flash Coders List
   Subject: Re: [Flashcoders] is there a recognised date format for xml?
  
   yes it's local
  
   On Tue, Aug 26, 2008 at 11:46 AM, Cor [EMAIL PROTECTED] wrote:
  
Mmmm, I don't know??
Somebody out there who does???
   
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
  Kenneth
Kawamoto
Sent: dinsdag 26 augustus 2008 12:43
To: 'Flash Coders List'
Subject: Re: [Flashcoders] is there a recognised date format for xml?
   
Isn't that always the case no matter how you construct the date
 object?
   
Kenneth Kawamoto
http://www.materiaprima.co.uk/
   
Cor wrote:
 Yes, but still it is depending of the localtime.

 Trace(targetDate); gives me in the Netherlands: Tue Aug 26 12:00:00
GMT+0200
 2008



 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
   Kenneth
 Kawamoto
 Sent: dinsdag 26 augustus 2008 12:22
 To: Flash Coders List
 Subject: Re: [Flashcoders] is there a recognised date format for
 xml?

 If so I'd ask my PHP coder to generate formatted string so that I
  need
 to code less ;)

 e.g.
 var xml:XML = data date=Tue Aug 26 12:00:00 GMT 2008 /
 var targetDate:Date = new Date([EMAIL PROTECTED]());

 ...a lot less code than yours!

 Kenneth Kawamoto
 http://www.materiaprima.co.uk/

 Cor wrote:
 In PHP you can do whatever you want: see http://nl.php.net/date
 I think it can also depend on your server.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
   allandt
 bik-elliott (thefieldcomic.com)
 Sent: dinsdag 26 augustus 2008 11:48
 To: Flash Coders List
 Subject: [Flashcoders] is there a recognised date format for xml?

 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

Re: [Flashcoders] is there a recognised date format for xml?

2008-08-26 Thread Hans Wichman
PHP:

Description
int time ( void )
Returns the current time measured in the number of seconds since the
Unix Epoch (January 1 1970 00:00:00 GMT).

FLASH:
setTime (Date.setTime method)
public setTime(millisecond:Number) : Number
Sets the date for the specified Date object in milliseconds since
midnight on January 1, 1970, and returns the new time in milliseconds.
Availability: ActionScript 1.0; Flash Player 5

So there might be a factor thousand difference, so you might have to
do php.time()*1000, but I don't know.

greetz
JC

On Tue, Aug 26, 2008 at 2:52 PM, allandt bik-elliott
(thefieldcomic.com) [EMAIL PROTECTED] wrote:

 would that be the same as the php time() method? because that would be super

 On Tue, Aug 26, 2008 at 1:27 PM, Hans Wichman 
 [EMAIL PROTECTED] wrote:

  Hi,
 
  isnt milliseconds since 1970 easier?
  Something like:
  date value=103810313 /
  new Date ().setTime(103810313))
 
  greetz
  JC
 
  On Tue, Aug 26, 2008 at 1:33 PM, allandt bik-elliott (thefieldcomic.com) 
  [EMAIL PROTECTED] wrote:
 
   The app is designed for people only in the uk - it will show the current
   time and the amount of time remaining until the countdown is finished so
  it
   will probably be worth giving the time based on the server time and
  setting
   the time in flash based on that
  
   the original question was about the best practise for getting the time
  for
   flash from xml
  
   thanks for the input so far guys
   a
  
   On Tue, Aug 26, 2008 at 12:16 PM, Cor [EMAIL PROTECTED] wrote:
  
So what if a user (from another continent) starts your app.
The difference will be greater or even before the server time.
So you would get a negative value???
   
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
  allandt
bik-elliott (thefieldcomic.com)
Sent: dinsdag 26 augustus 2008 12:56
To: Flash Coders List
Subject: Re: [Flashcoders] is there a recognised date format for xml?
   
yes it's local
   
On Tue, Aug 26, 2008 at 11:46 AM, Cor [EMAIL PROTECTED] wrote:
   
 Mmmm, I don't know??
 Somebody out there who does???

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
   Kenneth
 Kawamoto
 Sent: dinsdag 26 augustus 2008 12:43
 To: 'Flash Coders List'
 Subject: Re: [Flashcoders] is there a recognised date format for xml?

 Isn't that always the case no matter how you construct the date
  object?

 Kenneth Kawamoto
 http://www.materiaprima.co.uk/

 Cor wrote:
  Yes, but still it is depending of the localtime.
 
  Trace(targetDate); gives me in the Netherlands: Tue Aug 26 12:00:00
 GMT+0200
  2008
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of
Kenneth
  Kawamoto
  Sent: dinsdag 26 augustus 2008 12:22
  To: Flash Coders List
  Subject: Re: [Flashcoders] is there a recognised date format for
  xml?
 
  If so I'd ask my PHP coder to generate formatted string so that I
   need
  to code less ;)
 
  e.g.
  var xml:XML = data date=Tue Aug 26 12:00:00 GMT 2008 /
  var targetDate:Date = new Date([EMAIL PROTECTED]());
 
  ...a lot less code than yours!
 
  Kenneth Kawamoto
  http://www.materiaprima.co.uk/
 
  Cor wrote:
  In PHP you can do whatever you want: see http://nl.php.net/date
  I think it can also depend on your server.
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of
allandt
  bik-elliott (thefieldcomic.com)
  Sent: dinsdag 26 augustus 2008 11:48
  To: Flash Coders List
  Subject: [Flashcoders] is there a recognised date format for xml?
 
  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

Re: [Flashcoders] is there a recognised date format for xml?

2008-08-26 Thread Mark Walters
This is a good format to follow for date and time in XML:
http://www.w3.org/TR/NOTE-datetime .

Eg:

   Year:
   (eg 1997)
   Year and month:
  -MM (eg 1997-07)
   Complete date:
  -MM-DD (eg 1997-07-16)
   Complete date plus hours and minutes:
  -MM-DDThh:mmTZD (eg 1997-07-16T19:20+01:00)
   Complete date plus hours, minutes and seconds:
  -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
  -MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00)

where:

  = 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


Re: [SOLVED] [Flashcoders] is there a recognised date format for xml?

2008-08-26 Thread allandt bik-elliott (thefieldcomic.com)
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:
   (eg 1997)
   Year and month:
  -MM (eg 1997-07)
   Complete date:
  -MM-DD (eg 1997-07-16)
   Complete date plus hours and minutes:
  -MM-DDThh:mmTZD (eg 1997-07-16T19:20+01:00)
   Complete date plus hours, minutes and seconds:
  -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
  -MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00)

 where:

  = 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