Skip to content

fix: treat ? (Quartz no-value) like * in toHuman#9

Merged
merencia merged 1 commit into
masterfrom
fix-tohuman-question
Jun 23, 2026
Merged

fix: treat ? (Quartz no-value) like * in toHuman#9
merencia merged 1 commit into
masterfrom
fix-tohuman-question

Conversation

@merencia

Copy link
Copy Markdown
Member

A cron with a ? field rendered the ? as a literal value, producing nonsense:

toHuman('0 0 9 ? * MON')  // before: "at 9am on day ? on monday"
toHuman('0 0 9 15 * ?')   // before: "at 9am on day 15 on undefined"

? is the Quartz / AWS character for "no specific value" (used in day-of-month or day-of-week when the other is set). It means "no constraint on this field", the same as *.

Fix

toHuman now normalizes ? to *:

toHuman('0 0 9 ? * MON')  // "at 9am on monday"
toHuman('0 0 9 15 * ?')   // "at 9am on day 15"

Checks

  • typecheck, lint, build clean; 145 tests green (3 new to-human cases).

A ? field was rendered as a literal value, producing nonsense such as
"on day ?" or "on undefined". ? means "no constraint on this field" (Quartz /
AWS use it in day-of-month or day-of-week), so it is now normalized to *.
"0 0 9 ? * MON" now reads as "at 9am on monday".
@merencia merencia force-pushed the fix-tohuman-question branch from ffb66a5 to 785dffc Compare June 23, 2026 13:05
@merencia merencia changed the title Treat ? (Quartz no-value) like * in toHuman fix: treat ? (Quartz no-value) like * in toHuman Jun 23, 2026
@merencia merencia merged commit 395b489 into master Jun 23, 2026
5 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.

1 participant