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

Hotfix/get age #66

Merged
merged 5 commits into from
Jan 13, 2025
Merged

Conversation

Johannestegner
Copy link
Member

Type of change

  • New feature
  • Bug fix
  • Security patch
  • Documentation update

Description

This PR does two things:

  • Fixes issue where future dates returns positive age.
  • Adds a new option, clock, which implements the PSR-20 ClockInterface to allow abstraction of DateTime.

I'm not 100% sure that we want to document the clock option as of now, but seeing it's visible by default in the C# package, I exposed it here as well.

Related issue

#65

Motivation

Bugfix motivation is quite obvious, we want the bug fixed!

The ClockInterface part is primarily to make the code easier to test, while allowing the modification of time might be a good feature to expose to the users as well. The Abstraction is in my opinion something that we do want, the visible option I'm less sure about.

Checklist

  • I have read the CONTRIBUTING document.
  • I have read and accepted the Code of conduct
  • Tests passes.
  • Style lints passes.
  • Documentation is updated.

@Johannestegner Johannestegner merged commit 1be4bcb into personnummer:master Jan 13, 2025
4 checks passed
@Johannestegner Johannestegner deleted the hotfix/get-age branch January 13, 2025 16:01
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.

2 participants