Chapter 7 Example 3

by actionscriptbible
♥0 | Line 10 | Modified 2009-06-30 12:11:35 | MIT License
play

ActionScript3 source code

/**
 * Copyright actionscriptbible ( http://wonderfl.net/user/actionscriptbible )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/nYGk
 */

package {
  import com.actionscriptbible.Example;
  
  public class ch7ex3 extends Example {
    public function ch7ex3() {

      var d:Date = new Date(0);
      //at the stroke of midnight Jan. 1, 1970,
      //what time was it in YOUR timezone?
      trace(d); // Wed Dec 31 16:00:00 GMT-0800 1969 (that's in Los Angeles.)
      
      //OR: when the clock struck midnight on Jan. 1, 1970 in your home,
      //what epoch time was that?
      trace(Date.parse("1/1/1970")); // 28800000 (in LA)
     
    }
  }
}

Forked