Commit Graph

56 Commits

Author SHA1 Message Date
zachd ef6a167431 Enhance calendar functionality with start date management and excluded month visibility. Added start date state and date picker for user-defined start dates. Updated holiday and PTO calculations to respect the start date. Improved UI to toggle excluded months and display active months based on the start date. Refactored related utility functions for better date handling. 2025-11-10 00:28:42 +01:00
Zachary 1c4aa803bd Improve consecutive group calculation to only exclude all weekend groups 2024-11-22 20:46:35 +01:00
Zachary 98be02de8c Merge pull request #13 from zachd/allow-custom-weekends
Allow custom weekend days to be selected
2024-11-22 20:17:53 +01:00
Zachary 44762113e8 Add a nice cleanup of holidayUtils.js 2024-11-22 20:16:01 +01:00
Zachary f9dc40a857 Allow customisable Weekend days 2024-11-22 19:39:56 +01:00
Zachary 50fb4f399f Add extra sort on holiday naming due to conflict 2024-11-22 19:07:48 +01:00
Zachary 787f846b6a Merge pull request #9 from orrc/orrc/multi-day-holidays
Support multi-day holidays
2024-11-22 19:07:29 +01:00
Christopher Orr 3d89eb8582 Handle multi-day holidays.
Some countries (e.g. Russia, or Vietnam) have holidays which span several
days. Rather than using `holiday.date` from the date-holidays library, we
can check the `.start` (inclusive) and `.end` (exclusive) dates, and use
these to show multiple holiday days on the calendar.

However since these properties return a `Date` representing the start of
the day in that country, rather than an ISO string like `.date` does, we
also need to pass in the current browser `timezone` to the library, so
that we show the correct dates to the user.
2024-11-15 10:17:27 +01:00
Christopher Orr 7ac4e085eb Try to show holiday names using the browser's preferred language(s).
The date-holidays library has translations for many holidays, so we can
usually show a useful translation to the user, rather than all holidays
appearing in the language of the selected country.

However, they only support two-character language codes, and don't have
any sort of fallback, e.g. using an available `en` translation if we
pass in `en-GB`. So we just truncate all languages to two characters.
2024-11-15 10:17:12 +01:00
Zachary cca813b3e9 Revert "Switch to static site rendering"
This reverts commit 67b49ee687.
2024-11-14 14:27:48 +01:00
Zachary 67b49ee687 Switch to static site rendering 2024-11-14 14:24:23 +01:00
Zachary 4a70831b6c Revert "Switch to static site rendering"
This reverts commit b4d78cb6c9.
2024-11-14 14:14:52 +01:00
Zachary b4d78cb6c9 Switch to static site rendering 2024-11-14 13:57:48 +01:00
Zachary f22af52e9b Fix most errors and warnings with GPT, switch to .ts etc 2024-11-13 22:23:07 +01:00
Zachary 1b862710d7 Fix M, T, W... days 2024-11-13 17:15:59 +01:00
Zachary 37f69739f9 Add disclaimer about calculation 2024-11-13 15:07:17 +01:00
Zachary 99f76a9a99 Support Monday/Sunday day of week 2024-11-13 14:38:22 +01:00
Zachary a6402654a1 Allow to hide individual holidays 2024-11-13 01:31:06 +01:00
Zachary 98bb16730e Add state selection 2024-11-13 00:52:28 +01:00
Zachary ae7057463a Fix country selection 2024-11-12 09:53:12 +01:00
Zachary ddca5eb890 nbsp 2024-11-12 00:20:10 +01:00
Zachary d9b7af59fe Update icon 2024-11-12 00:07:50 +01:00
Zachary 6207ee9be4 🌴 2024-11-12 00:04:23 +01:00
Zachary 7153c0fcaa Update links 2024-11-11 23:59:58 +01:00
Zachary 63e1f4f46b Add Reset to Default link 2024-11-11 23:52:32 +01:00
Zachary 924cf09497 Fix localstorage to set on first load 2024-11-11 23:42:43 +01:00
Zachary 1b5ba69b9a Update localstorage on first load 2024-11-11 23:23:36 +01:00
Zachary 40abbe99ea Save to localstorage 2024-11-11 23:20:02 +01:00
Zachary 0cd349ee0e Add how 2024-11-11 20:16:38 +01:00
Zachary b15cd053b3 Add icons around days off 2024-11-11 19:50:28 +01:00
Zachary 6f08e1f42e Add licence 2024-11-11 19:42:38 +01:00
Zachary e7f5269502 Set assets url 2024-11-11 19:27:48 +01:00
Zachary b723417835 Add favicon 2024-11-11 19:24:04 +01:00
Zachary cd8d94b8a6 Add social image 2024-11-11 19:22:32 +01:00
Zachary c625155621 Add final stuff 2024-11-11 19:20:28 +01:00
Zachary b2df570a8d Add diagram 2024-11-11 19:15:57 +01:00
Zachary c5c8e10e70 Readme 2024-11-11 19:12:12 +01:00
Zachary 3cd5539ca8 Fix missing flag 2024-11-11 19:08:57 +01:00
Zachary 712b964f81 Remove default 2024-11-11 19:07:09 +01:00
Zachary d243fa241a Move to trace endpoint 2024-11-11 19:06:06 +01:00
Zachary 38cb569884 Fallback Ireland" 2024-11-11 18:59:47 +01:00
Zachary 570a951ead Try SSR for sveltekit headers 2024-11-11 18:57:00 +01:00
Zachary ad107089c7 Add CF country 2024-11-11 18:49:01 +01:00
Zachary 0b1ecdaa93 Smaller screens 2024-11-11 18:45:32 +01:00
Zachary df9b8ec1b3 Final fixes 2024-11-11 18:33:30 +01:00
Zachary 1c52afa674 Cleanup 2024-11-11 18:19:45 +01:00
Zachary 4216b83837 Improve algorithms 2024-11-11 16:47:35 +01:00
Zachary 355de281e3 Add key 2024-11-11 14:54:11 +01:00
Zachary e9e3a96cd9 Add flags 2024-11-10 22:41:06 +01:00
Zachary b3fb346509 Add fixed data for every country from wikipedia 2024-11-10 21:34:28 +01:00