Generate an epoch.

Javascript's Date Object always works in milliseconds, but most date/time code works on unix epochs. This is just a quickie one-off function designed to give you an epoch to work with.

function timestamp() {
    return Math.round( / 1000);
Published: 6/28/2013
Author: Don Burks
Tags: date
comments powered by Disqus