[Flashcoders] Re: Adding n days to dateField.selectedDate

2008-04-14 Thread Alan Neilsen
Thanks Gabino, Matthew  Michael
 
Can anyone tell me why the following isn't working. I get an error that there 
is no property with the name 'time' referring to 'd.time+=(8640*283).
 
var d:Date=new Date(2008,3,14);
d.time+=(8640*283); // 283 days, in milliseconds
trace(d.getFullYear()+/+(d.getMonth()+1)+/+d.getDate());
// 2009/1/21



This message is for the named person’s use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or; lost by any mistransmission. If
you receive this message in error, please immediately delete it and all
copies of it from your system, destroy any hard copies of it and notify
the sender. You must not directly or indirectly, use, disclose,
distribute, print or copy any part of this message if you are not the
intended recipient. GOULBURN OVENS INSTITUTE OF TAFE and
any of its subsidiaries each reserve the right to monitor all e-mail
communications through its networks. Any views expressed in this
message are those of the individual sender, except where the
message states otherwise and the sender is authorised to state them
to be the views of any such entity.

#
This e-mail message has been scanned for Viruses and Content and cleared 
by NetIQ MailMarshal and Goulburn Ovens Institute of TAFE
#
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: Adding n days to dateField.selectedDate

2008-04-14 Thread Matthew Houliston

On 15/04/2008 03:15, Alan Neilsen wrote:


I get an error that there is no property with the name 'time' referring to 
'd.time+=(8640*283).


Date.time is an AS3 property - didn't realise you were in AS2.

This should work:

var d:Date=new Date(2008,3,14);
d.setTime(d.getTime()+(8640*283)); // 283 days, in milliseconds
trace(d.getFullYear()+/+(d.getMonth()+1)+/+d.getDate());
// 2009/1/21
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders