Skip to content

Instantly share code, notes, and snippets.

@lsloan
Created September 21, 2016 12:36
Show Gist options
  • Save lsloan/ae80a8122f0c80109a80a3ff9d356a1a to your computer and use it in GitHub Desktop.
Save lsloan/ae80a8122f0c80109a80a3ff9d356a1a to your computer and use it in GitHub Desktop.
Using Node.js, get midnight for the current date and print as an ISO 8601 timestamp.
now=ISODate();
now.setHours(0,0,0,0);
midnight=now.toISOString();
print(midnight);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment