Last active
November 8, 2022 09:50
-
-
Save cp-sumi-k/118f2ab5ca41c19dfab439b2695d135b to your computer and use it in GitHub Desktop.
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
// Current date in millis : 1667813042954 | |
// A year after : 1699353114157 | |
console.log("A year after : ", new Date().setYear(cDate.getFullYear() + 1)) | |
// 3 months after : 1675765990138 | |
console.log("3 months after : ", new Date().setMonth(cDate.getMonth() + 3)) | |
// 2 days after : 1667990027784 | |
console.log("2 days after : ", new Date().setDate(cDate.getDate() + 2)) | |
// 2 hours after : 1667824456277 | |
console.log("2 hours after : ", new Date().setHours(cDate.getHours() + 2)) | |
// 5 minutes after : 1667817585028 | |
console.log("5 minutes after : ", new Date().setMinutes(cDate.getMinutes() + 5)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment