Well, the month is zero indexed and today is 2/2 not 2/1 so that might be what your seeing….

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jonathan Miranda
Sent: Thursday, February 02, 2006 11:43 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Date Class switch?

 

Alright, I used this in the Alpha and it worked fine….but in the Beta it’s reversed.

public function updateVisit() {

var mySharedObject:SharedObject = SharedObject.getLocal("REQTWA");

if(mySharedObject.data.lastvisit != null) {

VisitText.text = "Your last visit was " + mySharedObject.data.lastvisit.month + "/" + mySharedObject.data.lastvisit.date + "/" + mySharedObject.data.lastvisit.fullYear;

} else {

VisitText.text = "This is your first visit.";  

}

mySharedObject.data.lastvisit = new Date();

mySharedObject.flush();

}

it comes out 1/2/2006 ….and it’s 2/1/2006

_________________________________________

Jonathan Miranda

Flexible Master of the Web

"In the game of chess, it's important to never let your opponent see your pieces."




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to