René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

Date [JavaScript snippet]

function main() {

  var dt_now = new Date();
  var dt_1970_08_28 = new Date(1970, 28, 08);

  txt_out('dt_now:        ' + dt_now);
  txt_out('dt_1970_08_28: ' + dt_1970_08_28);

  txt_out('getFullYear:   ' + dt_now.getFullYear());
  txt_out('getMonth:      ' + dt_now.getMonth   ());
  txt_out('getDate:       ' + dt_now.getDate    ());
  txt_out('getHours:      ' + dt_now.getHours   ());
  txt_out('getMinutes:    ' + dt_now.getMinutes ());
  txt_out('getSeconds:    ' + dt_now.getSeconds ());
  txt_out('getDay:        ' + dt_now.getDay     ());  
  txt_out('getTime:       ' + dt_now.getTime    ());  // milliseconds since January 1st, 1970


//txt_out('dt+1: ' + (dt+1));
}