library partial-date
A simple date parser and formatter for dealing with partial dates.
bigfishtv/partial-date
A simple date parser and formatter for dealing with partial dates.
- Monday, March 9, 2015
- by ifunk
- Repository
- 4 Watchers
- 3 Stars
- 19 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
, (*1)
Partial Date
A simple PHP date parser and formatter for dealing with partial dates.
This is handy when you want to store a year or year/month in MySQL date format without
specifying a month or day., (*2)
<?php
use Bigfish\PartialDate;
// from Australian date format to SQL
$date = new PartialDate('2/2015');
echo $date->toSQLFormat(); // outputs 2015-02-00
// from SQL date format to Australian
$date = new PartialDate('2015-02-00');
echo $date->toAusFormat(); // outputs 02/2015
// parse method
$data = new PartialDate();
$date->parse('12/12/14');
// setDate method
$data = new PartialDate();
$date->setDate(2015, 2, 3);
dev-master
9999999-dev
A simple date parser and formatter for dealing with partial dates.
Sources
Download
BSD-3-Clause
The Development Requires
by
Adam Royle
1.0.0
1.0.0.0
A simple date parser and formatter for dealing with partial dates.
Sources
Download
BSD-3-Clause
The Development Requires
by
Adam Royle