PHP Classes

QDate: Manipulate dates in different formats

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 269 All time: 7,731 This week: 660Up
Version License PHP version Categories
qdate 0.1MIT/X Consortium ...5PHP 5, Time and Date
Description 

Author

This package can be used to manipulate dates in several formats.

There are base classes that take care of generic date formatting functions and options.

A base container sub-class provides functions to set and get each element of a date like the year, month, day, hour, minute, second, etc.

There are also two sub-classes to change the default date format to the German format or ISO.

The classes provide a fluent interface so several concatenated operations may be called within single statement.

Easily to enhance by defining a new Q{LANGUAGE}Date class, where you only have to define the locale (like QGermanDate)=>

class QNetherlandDate extends QDateContainer {
const lang = 'nl_NL';
const locale = 'nld_nld';

...
}

Now the Class creates month and day names for the Netherlands.


class QFormat holds country specific date format rules.

$f = new QFormat;
$f->set({your-array-with-formats})

Look at the class format for getting the array structure.

(Documentation comes later.)

Picture of Tom Schaefer
  Performance   Level  
Name: Tom Schaefer is available for providing paid consulting. Contact Tom Schaefer .
Classes: 39 packages by
Country: Germany Germany
Age: ???
All time rank: 1088 in Germany Germany
Week rank: 197 Down11 in Germany Germany Down
Innovation award
Innovation award
Nominee: 9x

Winner: 1x

  Files folder image Files (2)  
File Role Description
Plain text file QDate.class.php Class Set of Date Classes
Accessible without login Plain text file sample.php Example Samples showing how to use the fluent interface design.

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:269
This week:0
All time:7,731
This week:660Up