Last active
October 17, 2018 03:49
-
-
Save jcinis/470180efe6526465e977caa1884f878a to your computer and use it in GitHub Desktop.
Calculating my life in days instead of years
This file contains 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"); | |
// The number of days since your birthday + 1 (so that your birthday counts as day #1) | |
let lifeDay = moment().diff(moment("1981-04-17"),"days") + 1; | |
console.log("Today is day " + lifeDay + " of my life"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment