Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor date format classes #146

Merged
merged 12 commits into from
Feb 1, 2024
Merged

Refactor date format classes #146

merged 12 commits into from
Feb 1, 2024

Conversation

tilen1976
Copy link
Contributor

Make date format classes handle its own methods and data:

  • Add abstract super class DateFormat with abstract methods implemented in subclasses IsoDateFormat and
    SsbDateformat
  • Method get_floor returns first date in period (date from)
  • Method get_ceil returns last date in period (date until)
  • Handle KeyError in SsbDateFormat methods - returns None
  • Add tests and doctests
  • Remove unnecessary doctests

Copy link

sonarcloud bot commented Feb 1, 2024

@tilen1976 tilen1976 marked this pull request as ready for review February 1, 2024 11:34
@tilen1976 tilen1976 requested a review from a team as a code owner February 1, 2024 11:34
Copy link
Member

@mmwinther mmwinther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, much easier to follow the code now 🤩

@tilen1976 tilen1976 merged commit 52db883 into master Feb 1, 2024
15 checks passed
@tilen1976 tilen1976 deleted the chore/refactor-date-formats branch February 1, 2024 11:41
@mmwinther mmwinther added the refactoring Refactoring label Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants