PHP Classes
elePHPant
Icontem

QDate: Manipulate dates in different formats

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2008-06-01 (8 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 265 All time: 7,269 This week: 885Up
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 <contact>
Classes: 39 packages by
Country: Germany Germany
Innovation award
Innovation award
Nominee: 9x

Winner: 1x

  Files folder image Files  
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.

 Version Control Unique User Downloads Download Rankings  
 0%
Total:265
This week:0
All time:7,269
This week:885Up