Download the PHP package natedrake/datehelper without Composer
On this page you can find all versions of the php package natedrake/datehelper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package datehelper
DateHelper
Manipulate PHP Date
Install
To install this package add it as a dependency using composer
composer.json
`
Usage
``
returns the amount of time since the date provided in date posted.
E.g. 10 seconds ago, less than a minute ago, a week ago, 3 weeks ago, a fortnight ago, etc
Classes
Natedrake\DateHelper\Date
Usage:
``
Example:
``
returns '12th'
Methods:
``
returns the difference since the provided date. E.g 10 seconds ago, a week ago, a fortnight, ago, 3 weeks ago, etc
``
returns the ordinal for the number provided. E.g. 1st, 10th, 3rd, etc.
Natedrake\DateHelper\DateFormat
Usage:
``
Example:
``
returns true, or false if year of date isn't a leap year
Methods:
``
returns a DateFormat object to use
``
set the date of the date format object
``
returns the date in the provided format.
``
There are a list of predefined formats in the DateFormat class. ``