When the player initially starts the game save the date, unixtime to localstorage.
When the player starts the game again, compare that date to the current one.
If the time elapsed is equal to a day, overwrite the current local storage to the current date.
Obviously if the game doesn't get restarted all the time, then you will need to check the time occasionally.