Download the PHP package talal424/calendars without Composer
On this page you can find all versions of the php package talal424/calendars. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package calendars
Calendars
This is a replica of Keith Wood's Calendar jQuery plugin written in PHP
This plugin provides support for various world calendars.
Until now the available calendars are:
- Georgian calendar
- Umm al-Qura calendar (originally written by Amro Osama)
still yet to come and contributes are very welcome.
Install:
-
clone from Git or download then require the autoloader:
- or require from composer then require composer's autoloader:
Usage & examples:
Localisation and Languages
Talal424\Calendars\Calendars
this class has the exception messages stored as $regionalOptions
it can be overwritten by any calendar, so you can make a special message for a specific calendar. this will be explain later on.
if the language is not set the default language will be used. if the default language is not set or not found, the first language will be used. if none is found an exception will be thrown.
Other Calendars
classes of calendars have the language and settings stored in $regionalOptions
each language code can have its own settings and language, and it can have these attributes:
- epochs: The epoch names.
- monthNames: The long names of the months of the year.
- monthNamesShort: The short names of the months of the year.
- dayNames: The long names of the days of the week.
- dayNamesShort: The short names of the days of the week.
- localNumbers: true/false subtitue the digits with ones supplied e.g Arabic/Indian digits
- digits: The digits to subtitute
- dateFormat: The date format for this calendar.
plus any exception message.
example:
you can also if you use one language but different settings - just like our example above - by setting days and months names as default properties and then make the ' can be changed ' settings inside the $regionalOptions array
example:
Date formats:
The format can be combinations of the following:
- d - day of month (no leading zero)
- dd - day of month (two digit)
- o - day of year (no leading zeros)
- oo - day of year (three digit)
- D - day name short
- DD - day name long
- w - week of year (no leading zero)
- ww - week of year (two digit)
- m - month of year (no leading zero)
- mm - month of year (two digit)
- M - month name short
- MM - month name long
- E - the epoch designator for this date, e.g. BCE or CE.
- yy - year (two digit)
- yyyy - year (four digit)
- YYYY - formatted year
- J - Julian date (days since January 1, 4713 BCE Greenwich noon)
- @ - Unix timestamp (s since 01/01/1970)
- ! - Windows ticks (100ns since 01/01/0001)
- '...' - literal text
- '' - single quote