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

Support for interim numbers. #61

Merged
merged 5 commits into from
Jan 21, 2024

Conversation

Johannestegner
Copy link
Member

Type of change

  • New feature

Description

This PR includes a few different changes to make the package adhere to the v3.1 specification (https://github.com/personnummer/meta#package-specification-v31).

Interim numbers have been introduced to the package. Tests included.
A strlen check have been made on the initial input (in constructor), throwing an error if the string is under 10 chars and over 13 (if it is, it's not a correctly formatted number and can be discarded directly).

The public function getDate() : Date; implementation have not yet been added, hence, the package will not be fully ready for a 3.1 compliant release, while, if released, it should most likely be a major or minor release (seeing this is a lot more than a patch change).

Related issue

#60

Motivation

We want the packages to be using the latest spec! :)

Checklist

  • I have read the CONTRIBUTING document.
  • I have read and accepted the Code of conduct
  • Tests passes.
  • Style lints passes.
  • Documentation of new public methods exists.
  • New tests added which covers the added code.
  • Documentation is updated.

@rasmusbe rasmusbe merged commit 7dace66 into personnummer:master Jan 21, 2024
4 checks passed
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