Created
January 3, 2017 16:40
-
-
Save naranjja/3b944a225c016434c1a55bcb6f95cb56 to your computer and use it in GitHub Desktop.
Get today range in milliseconds since epoch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var moment = require('moment'); | |
// get today in milliseconds since epoch | |
var todayStart = moment().startOf('day').unix() * 1000; // set to 12:00 am today | |
var todayEnd = moment().endOf('day').unix() * 1000; // set to 23:59 pm today |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment