Login   Register  
PHP Classes
elePHPant
Icontem

QDate: Manipulate dates in different formats

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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 (6 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 260 All time: 6,795 This week: 978Up
Version License PHP version Categories  
qdate 0.1MIT/X Consortium License5PHP 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
Name: Tom Schaefer is available for providing paid consulting. Contact Tom Schaefer .
Classes: 39 packages by
Country: Germany Germany
Age: ???
All time rank: 1109 in Germany Germany
Week rank: 155 Down6 in Germany Germany Up
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:260All time:6,795
 This week:0This week:978Up