Actually its not that easy, your timer wont run when the game isn't active.
Go ahead and store the current date in localstorage.
Then compare the last stored date with current date.
May need to decide, when the play for the day is over and to update the storage.