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

Incorrect values returned for getPrevDate #313

Closed
ilya-v-trofimov opened this issue Apr 29, 2024 · 2 comments
Closed

Incorrect values returned for getPrevDate #313

ilya-v-trofimov opened this issue Apr 29, 2024 · 2 comments

Comments

@ilya-v-trofimov
Copy link

Hi,
When running this code:

let schedule = parseCronExpression('0 10 * * 3')
wedSched.getPrevDate(new Date('2024-05-01T09:00:00'))

expected result is: 2024-04-24T00:00:00.000Z
actual result is: 2024-03-27T00:00:00.000Z

Node: 20.12.2

P4sca1 pushed a commit that referenced this issue Apr 29, 2024
# [5.0.0-next.1](v4.0.0...v5.0.0-next.1) (2024-04-29)

### Bug Fixes

* **getPrevDate:** the wrong result was sometimes returned for months with less than 31 days ([6537bc1](6537bc1)), closes [#313](#313)
* update dependencies, switch from eslint + prettier to biome, ([43c2868](43c2868))

### BREAKING CHANGES

* Support for Node.js 16 is dropped, as it is End of Life.
Our code is tested against Node.js LTS release version 18 and 20.

There are a lot of changes in this commit, because of formatting changes (e.g. tabs instead of spaces).

Configured vitest to generate a junit test report, which is uploaded to CircleCI. The CI will now run biome check, which checks the code for linting and formatting issues.

Signed-off-by: Pascal Sthamer <10992664+P4sca1@users.noreply.github.com>
@P4sca1 P4sca1 closed this as completed in 6537bc1 Apr 29, 2024
P4sca1 pushed a commit that referenced this issue Apr 29, 2024
# [5.0.0](v4.0.0...v5.0.0) (2024-04-29)

### Bug Fixes

* **getPrevDate:** the wrong result was sometimes returned for months with less than 31 days ([6537bc1](6537bc1)), closes [#313](#313)
* update dependencies, switch from eslint + prettier to biome, ([43c2868](43c2868))

### BREAKING CHANGES

* Support for Node.js 16 is dropped, as it is End of Life.
Our code is tested against Node.js LTS release version 18 and 20.

There are a lot of changes in this commit, because of formatting changes (e.g. tabs instead of spaces).

Configured vitest to generate a junit test report, which is uploaded to CircleCI. The CI will now run biome check, which checks the code for linting and formatting issues.

Signed-off-by: Pascal Sthamer <10992664+P4sca1@users.noreply.github.com>
@P4sca1
Copy link
Owner

P4sca1 commented Apr 29, 2024

Hey @ilya-v-trofimov 👋
Thank you for pointing out this issue. It should be fixed in version 5.0.0. It is a major release, as support for Node.js 16 has also been dropped. Other than that, the API is unchanged. If you still have issues, please reopen this issue.

@P4sca1
Copy link
Owner

P4sca1 commented Apr 29, 2024

Release for version 5.0.0 failed. Use version 5.0.1 instead.

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

2 participants