Download the PHP package iescarro/php-util without Composer
On this page you can find all versions of the php package iescarro/php-util. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package php-util
📆 Util\Date
A simple and expressive utility class for handling date and time operations in PHP, inspired by the readability of frameworks like Laravel and Rails.
🚀 Features
- Chainable and readable date calculations
- Expressive API (e.g.,
Date::now()->days(3)->ago()) - Easily extendable
- Built-in constants for consistent formatting
- Supports relative time manipulation (seconds, minutes, hours, days, months, years)
📦 Installation
You can install the package via Composer:
Make sure your project supports PSR-4 autoloading.
If you're loading it manually or without a full Composer project, ensure your autoloader includes the Util\ namespace:
Then run:
✅ Usage
🧱 Class Reference
Constants
Date::DEFAULT_DATETIME_FORMAT– 'Y-m-d H:i:s'
Static Methods
Date::now($format)– returns the current datetime
Chainable Helpers
Relative Methods
days_ago($n)months_from_now($n)hours_ago($n)minutes_from_now($n)- ...and more!
📄 License
MIT © Ian Escarro
See LICENSE for details.
All versions of php-util with dependencies
PHP Build Version
Package Version
No informations.
The package iescarro/php-util contains the following files
Loading the files please wait ...