Closed nioc closed 1 year ago
According to the doc:
use24HourTimeFormat: boolean - If true, descriptions will use a 24-hour clock (Default: false but some translations will default to true)
The following code with fr locale should set default use24HourTimeFormat to true.
fr
use24HourTimeFormat
true
cronstrue.toString('30 52 0 * * *', { locale: 'fr' })
Cron Expression 30 52 0 * * *
30 52 0 * * *
Expected Output "À 00:52:30"
Actual Output "À 12:52:30 AM"
Prerequisites
I saw where it should be fixed: https://github.com/bradymholt/cRonstrue/blob/master/src/i18n/locales/fr.ts#L19 I'll propose a PR for fix.
According to the doc:
The following code with
fr
locale should set defaultuse24HourTimeFormat
totrue
.Cron Expression
30 52 0 * * *
Expected Output "À 00:52:30"
Actual Output "À 12:52:30 AM"
Prerequisites