Download the PHP package opencafe/datium without Composer
On this page you can find all versions of the php package opencafe/datium. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package datium
Datium
Awesome DateTime package written in PHP, with generalization support in calendar and translation, which makes Datium powerful and simple.
- Simplicity in code and logic
- Expandable in every part
- Hijri, Jalali, Julian and Kurdish Calendars support
Support
- ^PHP:5.4
- PHP:7
Installation
Via Composer
Manual
Just require in your project and use Datium namespace as following example:
Usage
Simply get what you want:
As datium output
Or working with date as simple as you need:
Get
Get Datium as DateTime PHP object:
Or return it as simple date and time string:
And even with custom PHP YMD format:
Timestamp format:
Easy usage:
Create
You can also simply create new time:
Add Date
This method allow you add some year, month, week, day, hour, minute and second to current date.
Sub Date
Sub some year, month, day, hour, minute and second from current date.
Date Difference
This method will return the difference between two specific date with php date interval type.
Human readable time difference
Datium also supports human readable date and time difference.
Leap year
Define leap year of current year with generalization support.
Get day of date
This method returns day of week or day of year with generalization support, you can add this feature to your custom calendars like other supported calendars in Datium.
Day of Year
What the day is in current year:
Day of Week
What day of week is current day:
Last Day of Month
How many days is current month
Generalization
Calendar generalization
Datium supports calendar generalization, you can add customized calendars to Datium and used them as it's own default calendars.
Convert all calendars which supported on Datium or event your customized calendars as simple as possible:
Translation Generalization
Generalization in translation is another Datium generalization support.
Change Configuration
You can change any configuration after initialize Datium object.