Ishadijcks / Ishadijcks.github.io

PokéClicker
15 stars 32 forks source link

updated date strings to fix some fringe case bugs #25

Closed diff-by-default closed 7 years ago

diff-by-default commented 8 years ago

new Date.getDate() only returns an integer (1-31) describing the day of the month. This could have caused minor issues if a player stopped playing for exactly one month or one year. Using the full date string (i.e. "Thu Oct 06 2016") will resolve this issue and be more robust.

This will also have a side effect of giving everyone a free new quest on the day this change goes live...but whatever.

Ishadijcks commented 8 years ago

Nice, only thing that needs to be changed is the default value in the player object.

Ishadijcks commented 8 years ago

Btw, I just remembered something. For a future update I also need to know how many seconds the players has been away. Do you think it's easier to save a DateStrings and a milisecond since 1900, or store one Data object and parse it every time?