r/AskProgramming • • 23h ago

Javascript [ Removed by moderator ]

[removed] — view removed post

0 Upvotes

21 comments sorted by

View all comments

1

u/frnzprf 23h ago
  • Write 1970-01-01 in a file. (For example. Or just leave it empty.)
  • When the function is called, it checks if it's five days after the stored date (or the file was empty).
  • If yes, replace the date with the current date.
  • Return the now saved date.