Created
August 13, 2019 12:25
-
-
Save bennycode/0e017b26fc9c2c8ffa1c5d88174fa323 to your computer and use it in GitHub Desktop.
moment.js Cheatsheet
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
| const moment = require('moment'); | |
| const date = moment('2019-07-23', 'YYYY-MM-DD'); | |
| const oneWeekLater = date.add(1, 'week'); | |
| console.log(oneWeekLater.format()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment