Skip to content

Refactor/simplify methods#142

Merged
lauft merged 4 commits intomainfrom
refactor/simplify-methods
Dec 27, 2025
Merged

Refactor/simplify methods#142
lauft merged 4 commits intomainfrom
refactor/simplify-methods

Conversation

@lauft
Copy link
Member

@lauft lauft commented Dec 27, 2025

  • Use explicit class-based calls for static methods
  • Use date methods
  • Extract 'date' function, encapsulate usage of SmartDayArrow in utils.py
    • Introduce class SmartDayArrowWrapper to provide test functions for dates
    • SmartDayArrow shifters now only accept a callable returning a date
    • HolidayGenerator.on(...) now only accepts a callable returning a date
    • Replace static date-shifting methods with condition checks from utils.py.
  • Simplify date methods
  • The 'Monday on or first Monday following the 1st of ' is equivalent to
    the 'first Monday of '.

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
The 'Monday on or first Monday following the 1st of <month>' is equivalent to
the 'first Monday of <month>'.

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
- Introduce class SmartDayArrowWrapper to provide test functions for dates
- SmartDayArrow shifters now only accept a callable returning a date
- HolidayGenerator.on(...) now only accepts a callable returning a date
- Replace static date-shifting methods with condition checks from utils.py.

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
@lauft lauft force-pushed the refactor/simplify-methods branch from 136c5cc to 9776845 Compare December 27, 2025 21:34
@lauft lauft merged commit 799d9dc into main Dec 27, 2025
11 checks passed
@lauft lauft deleted the refactor/simplify-methods branch December 28, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant