@eturnity/eturnity_reusable_components 7.51.15-EPDM-9631.1 → 7.51.15-EPDM-9631.2

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "7.51.15-EPDM-9631.1",
3
+ "version": "7.51.15-EPDM-9631.2",
4
4
  "files": [
5
5
  "dist",
6
6
  "src"
@@ -35,12 +35,16 @@ export const toLocaleTime = ({
35
35
  locale = localStorage.getItem('lang'),
36
36
  value,
37
37
  }) => {
38
- const oneDigitHoursAllowed = ['en-us']
38
+ const nonDefaultFormatting = {
39
+ 'es-es': { hour: '2-digit' },
40
+ 'cs-es': { hour: '2-digit' },
41
+ }
39
42
 
40
43
  const localeLC = locale.toLowerCase()
41
44
  const options = {
42
- hour: oneDigitHoursAllowed.includes(localeLC) ? 'numeric' : '2-digit',
45
+ hour: 'numeric',
43
46
  minute: 'numeric',
47
+ ...nonDefaultFormatting[localeLC],
44
48
  }
45
49
 
46
50
  return new Intl.DateTimeFormat(localeLC, options).format(Date.parse(value))