bradymholt / cRonstrue

JavaScript library that translates Cron expressions into human readable descriptions
http://bradymholt.github.io/cRonstrue/
MIT License
1.28k stars 168 forks source link

fr locale should set use24HourTimeFormat to true #274

Closed nioc closed 1 year ago

nioc commented 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.

cronstrue.toString('30 52 0 * * *', { locale: 'fr' }) 

Cron Expression 30 52 0 * * *

Expected Output "À 00:52:30"

Actual Output "À 12:52:30 AM"

Prerequisites

nioc commented 1 year ago

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.