discourse-cakeday/test/javascripts/fixtures
Régis Hanol 9f0a80707f
DEV: refactor to centralize anniversary and birthday computation (#96)
The "anniversary" date is called the "cakedate" and the "birthday" date is called the "birthdate". Hence most of the changes on the front-end to account for the name changes.

FIX: the anniversary is based on the users.created_at column which is a "timestamp without a timezone" so we need to apply the current_user's timezone to filter and show the date properly. We now always use the current_user's timezone that is stored on the server, rather than using the "timezone offset" sent by the client.

FIX: leap years were not accounted for. Understandably as it's quite tricky...

FIX: the ordering of the anniversary and birthday controllers now uses only informations that is shown to the user. No more sorting by likes which were not shown in the UI and made the sorting appear random/broken to the user. Now the sort is the date formatted with the american date format (aka "MMDDYYYY") and uses the `username_lower` for tiebreaks.

FIX: the 'cakeday-test-disconnected' wasn't working because the filename did not end in '-test.js' and so wasn't picked up by qunit. I renamed it and fixed it. Not entirely sure it's _that_ useful though.

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2023-01-17 11:07:23 +01:00
..
anniversaries.js DEV: refactor to centralize anniversary and birthday computation (#96) 2023-01-17 11:07:23 +01:00
birthdays.js FEATURE: Separate sidebar links for anniv and bday (#85) 2022-10-13 12:39:16 -06:00