You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For more usage examples, including a demonstration of how cRonstrue can handle some very complex cron expressions, you can [reference the unit tests](https://github.com/bradymholt/cRonstrue/blob/main/test/cronstrue.ts).
100
100
101
+
### i18n
102
+
103
+
By default, only the English translation (`en`) is included when you import and use cRonstrue. To use other languages, please see the [i18n section](#i18n) below.
104
+
101
105
### CLI Usage
102
106
103
107
```sh
@@ -124,7 +128,7 @@ An options object can be passed as the second parameter to `cronstrue.toString`.
124
128
-**dayOfWeekStartIndexZero: boolean** - Whether to interpret cron expression DOW `1` as Sunday or Monday. (Default: true)
125
129
-**monthStartIndexZero: boolean** - Whether to interpret January as `0` or `1`. (Default: false)
126
130
-**use24HourTimeFormat: boolean** - If true, descriptions will use a [24-hour clock](https://en.wikipedia.org/wiki/24-hour_clock) (Default: false but some translations will default to true)
127
-
-**locale: string** - The locale to use (Default: "en" - see [Default Locale](#default-locale-english))
131
+
-**locale: string** - The locale to use (Default: "en")
128
132
-**logicalAndDayFields: boolean** - If true, descriptions for cron expressions with both day of month and day of week specified will follow a logical-AND wording rather than logical-OR wording; e.g. "...between day 11 and 17 of the month, only on Friday" rather than "...between day 11 and 17 of the month, and on Friday" (Default: false)
129
133
130
134
## i18n
@@ -173,25 +177,6 @@ cronstrue.toString("*/5 * * * *", { locale: "fr" }); // => Toutes les 5 minutes
The English locale (`en`) is the default locale included with the main cronstrue module (no need to explicitly import). In addition, `en` is set as the default locale option, so you do not need to include it in the `.toString()` options (see [Options](#options)).
179
-
180
-
```js
181
-
// Node / CommonJS
182
-
// English (`en`) is included with main cronstrue module
0 commit comments