Minimized unix timestamp in JS

/ Published in: JavaScript
Save to your folder(s)

Copy this code and paste it in your HTML
  1. function time() {
  2. return Math.floor((new Date).getTime() / 1E3)
  3. }
  5. // returns 1317660968 //just like php do

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.