From f912fd0c6fbf0d1d74fa5b0aa63a026483448940 Mon Sep 17 00:00:00 2001 From: Alex Martin Date: Sat, 13 Feb 2021 18:25:19 +0100 Subject: [PATCH 1/2] Update cron.md Add docs for the new `locale` and `use24hour` attribute. --- cron.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/cron.md b/cron.md index e9191c5..8557eb8 100644 --- a/cron.md +++ b/cron.md @@ -45,3 +45,42 @@ This will output the following HTML: ``` As you can see, we display the human readable value and show the cron expression when you hover over it. + +## Localization + +By default, the cron component will translate your expression to English. Use the `locale` attribute to select another destination language: + +```html + +``` + +This will output the following HTML: + +```html + + Katru svētdienu plkst. 12:00am + +``` + +Currently, the following locales are supported: + +- `fr` +- `lv` + +Consider contributing to https://github.com/lorisleiva/cron-translator to add more. + +## 24-Hour Time Format + +To display time in the 24-hour format, the cron component acccepts a `use24hour` attribute: + +```html + +``` + +This will output the following HTML: + +```html + + Chaque dimanche à 0:00 + +``` From 39170b5bbe8c5c0dd0c7602e0fda4e6e4360b2e6 Mon Sep 17 00:00:00 2001 From: Alex Martin Date: Sat, 13 Feb 2021 22:00:01 +0100 Subject: [PATCH 2/2] Update cron.md Fixed the `use24hour` boolean attribute example. --- cron.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cron.md b/cron.md index 8557eb8..4d13594 100644 --- a/cron.md +++ b/cron.md @@ -71,10 +71,10 @@ Consider contributing to https://github.com/lorisleiva/cron-translator to add mo ## 24-Hour Time Format -To display time in the 24-hour format, the cron component acccepts a `use24hour` attribute: +To display time in the 24-hour format, the cron component acccepts a `use24hour` boolean attribute: ```html - + ``` This will output the following HTML: