Hm, i am trying to cast a variable of the type Object to the type Date
I got my variable "d" here, which is actually an instance of DatePHP Code:var cookie = SharedObject.getLocal("50FirstDates");
cookie.data.myDate = Object(new Date(1969,11,30));
var d:Object = cookie.data.myDate;
if (d instanceof Date) {
trace(Array(d));// works
trace(String(d));// works
trace(Number(d));// works
trace(Date(d));// doesn't work
}
and can't use it as a Date, what am i missing?
Any ideas for a workaround?
[edit]
In line 2 i need the date stored as an Object,
as i use a custom cookie handler class...




Reply With Quote