Download the PHP package gustavowiller/intl-date-time without Composer
On this page you can find all versions of the php package gustavowiller/intl-date-time. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gustavowiller/intl-date-time
More information about gustavowiller/intl-date-time
Files in gustavowiller/intl-date-time
Package intl-date-time
Short Description International datepicker for Laravel Nova.
License MIT
Informations about the package intl-date-time
International DateTime
International datepicker for Laravel Nova
Apply localisation in 63 different locales to Laravel Nova's default DateTime
field that currently doesn't support localisation out of the box.
Installation
You can install the package in to a Laravel app that uses Nova via composer:
Usage
The API is adapted from Nova's default DateTime
Field.
The module itself offers 3 optional configurations:
- locale - OPTIONAL - With this you can define the module's locale. If you do not it will automatically use your app's
config('app.locale')
. If you manually define an unsupported locale it will throw an Exception! - dateFormat - OPTIONAL - With this you can define a date format. If you do not provide it the module will automatically use the appropriate locale's date format. The format must be MomentJS compatible!
- timeFormat - OPTIONAL - With this you can define a time format. If you do not provide it the module will automatically use
HH:mm:ss
. The format must be MomentJS compatible! If you manually define an unsupported time format it will throw an Exception!
Simply use IntlDateTime
class instead of DateTime
directly or alias it like the example below so you won't have to refactor too much existing code.
List of supported locales
This module supports only locales that are SUPPORTED BY BOTH MomentJS AND Flatpickr!
The 63 locales that are currently supported are:
Language | locale |
---|---|
Albanian | sq |
Arabic | ar |
Bangla | bn |
Belarusian | be |
Bulgarian | bg |
Burmese | my |
Catalan | ca |
Chinese (China) | zh-cn |
Chinese (Hong Kong) | zh-hk |
Chinese (Taiwan) | zh-tw |
Croatian | hr |
Czech | cs |
Danish | da |
Dutch | nl |
English | en |
English (Australia) | en-au |
English (Canada) | en-ca |
English (Ireland) | en-ie |
English (New Zealand) | en-nz |
English (United Kingdom) | en-gb |
Esperanto | eo |
Estonian | et |
Finnish | fi |
French | fr |
French (Canada) | fr-ca |
French (Switzerland) | fr-ch |
German | de |
German (Austria) | de-at |
German (Switzerland) | de-ch |
Greek | el |
Hebrew | he |
Hindi | hi |
Hungarian | hu |
Indonesian | id |
Italian | it |
Japanese | ja |
Kazakh | kk |
Khmer | km |
Korean | ko |
Latvian | lv |
Lithuanian | lt |
Macedonian | mk |
Malaysian | ms |
Norwegian | nb |
Persian | fa |
Polish | pl |
Portuguese | pt |
Punjabi | pa-in |
Romanian | ro |
Russian | ru |
Serbian | sr |
Sinhala | si |
Slovak | sk |
Slovenian | sl |
Spanish | es |
Spanish (Dominican Republic) | es-do |
Spanish (United States) | es-us |
Swedish | sv |
Thai | th |
Turkish | tr |
Ukrainian | uk |
Vietnamese | vi |
Welsh | cy |
NOTE
This an evolution of my original Slovenian DateTime