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

[BUG] - Format EF as Personnummer #30

Closed
Johannestegner opened this issue Feb 20, 2024 · 0 comments
Closed

[BUG] - Format EF as Personnummer #30

Johannestegner opened this issue Feb 20, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Johannestegner
Copy link
Member

Johannestegner commented Feb 20, 2024

Context

Enskild Firma should make use of the + separator in formatting if the firma/owner is above 100 years old.

The following snippet should be changed:

    public function format(bool $separator = true): string
    {
        $number = $this->getShortString();
        return $separator ? sprintf('%s-%s', substr($number, 0, 6), substr($number, 6)) : $number;
    }

Expected outcome

EF's with age over 100 should contain the + separator if separator param is true.

Actual outcome

EF's with age over 100 contains the - separator if separator param is true.

For more context, see: organisationsnummer/csharp#38

@Johannestegner Johannestegner added the bug Something isn't working label Feb 20, 2024
@Johannestegner Johannestegner self-assigned this Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant