An open API service indexing awesome lists of open source software.

https://github.com/tomkyle/datetime

DateTime Helper classes for PHP
https://github.com/tomkyle/datetime

Last synced: 7 months ago
JSON representation

DateTime Helper classes for PHP

Awesome Lists containing this project

README

          

#tomkyle/DateTime

This small package contains ~~some date and time related classes~~ for the time being a small class that creates a MySQL-ready string representation from a PHP DateTime object.

As you know, PHP's DateTime class already offers a [format method.](http://www.php.net/manual/en/datetime.format.php) But calling it everytime you need it in MySQL context with that `Y-m-d H:i:s` parameter may be annoying (and feel unclean, somehow).

##Usage
```php