Skip to content

Instantly share code, notes, and snippets.

@bookercodes
Last active August 29, 2015 14:23
Show Gist options
  • Save bookercodes/4271eea059b4e0a3cc83 to your computer and use it in GitHub Desktop.
Save bookercodes/4271eea059b4e0a3cc83 to your computer and use it in GitHub Desktop.
var time = "unix_timestamp here";
var then = moment.unix(time);
var by = moment(then).add({ days: 1 });
var expired = moment().isAfter(by);
var time = "unix_timestamp here";
var then = moment.unix();
var now = moment();
var expired = now.isAfter(then)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment