Created
November 7, 2021 15:57
-
-
Save Octagon-simon/3367d38adb3fc126bfcd023a52480a53 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
| function findNotifDate(date_notified = "2021-11-05 15:00:00") { | |
| /** | |
| * @ findNotifDate : Finds the Date Difference of a Notification | |
| * @ date_notified : The notification date | |
| **/ | |
| const date_sent_tmp = new Date(date_notified); | |
| //Check for timestamps | |
| if(date_notified.indexOf('-') != -1){ | |
| var date_sent = date_sent_tmp.getTime(); | |
| }else{ | |
| var date_sent = date_notified; | |
| } | |
| const date_now = new Date(); | |
| //current timestamp | |
| var today = date_now.getTime(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment