vlibDate

vLIB logo

6.27. dateToDays()

Function Description
  dateToDays (string timestamp)

Converts a vlibDate timestamp to a number of days since a long distant epoch. You can use this to store dates or to pass dates from 1 URL to another, and then to reconvert them use daysToDate().

The timestamp parameter is a vlibDate timestamp. For more information, please see the IMPORTANT section.

Example

   $encoded = $date->dateToDays($date->now());