vlibDate

vLIB logo

5. Important (inc. formatting)

Just a few of points before you get into vlibDate.

1) Throughout the documentation you will come across quite often the String type timestamp.
This is not a unix timestamp but a 'vlibDate timestamp'. vlibDate timestamps are simply a string in 'YYYY-MM-DD' format, i.e. 2002-01-25. If a unix timestamp is required the unixtime will be used as the type definition.

2) In many functions, you can define a format for the string to be returned as. This format uses similar syntax to the native php function strftime(), however not all formats are supported.

Here is a list of the formatting options supported:


Example

   $date = new vlibDate('en');
   echo $date->formatDate('2002-02-15', '%A %e%s of %B, %Y');


3) To set a default language for this class, you must edit the vlibIni.php file.