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

The function stringifyField parse Incorrect, It parse hours 6-18/3 to 6/6 #279

Open
daydaychen opened this issue Aug 1, 2022 · 3 comments
Assignees
Labels

Comments

@daydaychen
Copy link

if (range.end === max - step + 1) {
resultArr.push(range.start + '/' + step);

@harrisiirak
Copy link
Owner

Hi @daydaychen,

Thanks for reporting this. Can also please provide a code example?

Best regards,
Harri

@daydaychen
Copy link
Author

daydaychen commented Aug 1, 2022

Thanks for you reply.

import { parseExpression } from 'cron-parser'

var crontab = "0 6-18/6 * * *"
res = parseExpression(crontab).stringify()
// "0 6/6 * * *"

Could you tell me how it works? I don't understand.

if (range.end === max - step + 1) {
resultArr.push(range.start + '/' + step);

@harrisiirak harrisiirak self-assigned this Aug 1, 2022
@harrisiirak harrisiirak added the bug label Aug 1, 2022
@harrisiirak
Copy link
Owner

@daydaychen I'll investigate this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants