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

Issue with Day Addition/Subtraction in pl_PL Local #254

Open
Qionar opened this issue Nov 12, 2023 · 0 comments
Open

Issue with Day Addition/Subtraction in pl_PL Local #254

Qionar opened this issue Nov 12, 2023 · 0 comments

Comments

@Qionar
Copy link

Qionar commented Nov 12, 2023

Using the 'pl' locale, in some cases 23 hours are calculated instead of a full day when adding/subtracting using these methods.

This can be easily reproduced as follows:

   await Jiffy.setLocale('pl');

    print(
      Jiffy.parse('2023-10-29T00:00:00.000')
          .add(days: 1)
          .dateTime
          .toIso8601String(),
    );

   // output: 2023-10-29T23:00:00.000

    print(
      Jiffy.parse('2023-11-06T00:00:00.000')
          .subtract(weeks: 2)
          .dateTime
          .toIso8601String(),
    );

   // output: 2023-10-23T01:00:00.000

I expect to get the date 2023-10-30T00:00:00.000 instead of 2023-10-29T23:00:00.000 for addition and 2023-10-23T00:00:00.000 instead of 2023-10-23T01:00:00.00.000 for subtraction.

@Qionar Qionar changed the title Issue with Day Addition in pl_PL Local Issue with Day Addition/Subtraction in pl_PL Local Nov 12, 2023
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

No branches or pull requests

1 participant