Skip to content

Instantly share code, notes, and snippets.

@raychew13
Last active December 20, 2017 05:01
Show Gist options
  • Save raychew13/3591edc3af0ee369eb2c76070fdacb05 to your computer and use it in GitHub Desktop.
Save raychew13/3591edc3af0ee369eb2c76070fdacb05 to your computer and use it in GitHub Desktop.
// Tips on `moment` & `moment-timezone` js library
// Create string from timestamp
const moment = require('moment')
console.log(moment().format(("YYYY-MM-DD_hh-mm-ss")));
// This will print current date & time (i.e '2017-12-20_03-57-59')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment