A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [CS3] function to determine which date is older and newer?

  1. #1
    Member
    Join Date
    May 2007
    Posts
    44

    Lightbulb [CS3] function to determine which date is older and newer?

    I would like to get the current time from user`s computer,
    and compare that time with another time I pre-decided,
    and know if user`s time is newer than the my pre-decided time.

    I used
    Code:
    var now:Date = new Date();
    txtField.text = now.toString();
    to Get "Wed Sep 17 17:42:46 GMT+0900 2008"


    should I convert this to milliseconds?
    I don`t know what to do next.
    please help me.

    thank you

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    PHP Code:
    var old:Date = new Date(2008,8,17,12,0,0)
    var 
    now:Date = new Date();

    var 
    msecs:Number now-old;
    trace(msecs); 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center