Exemplo n.º 1
0
<?php

require_once "../general.php";
$t = Time::dateToUnix('12/07/1986');
echo $t . "\n";
echo Time::unixToDate(1350988194976 / 1000);
Exemplo n.º 2
0
<?php

require "time.php";
require "../db_con/db.php";
$stmt = DB::query("select * from orders where id=2");
$order = $stmt->fetch(PDO::FETCH_ASSOC);
//print_r(Time::dateDaysFromNow(30));
echo Time::dateDaysFromDate("2012-09-20", 30) . "\n";
echo Time::dateDaysFromNow(30) . "\n";
echo Time::unixToDate(time()) . "\n";
echo Time::dateToUnix("0000-00-00") . " - 0000-00-00\n";
echo Time::dbTimestampToFormat($order['date']);
print_r(Time::dbTimestampToArray($order['date']));
Exemplo n.º 3
0
 public function setBirthday($value)
 {
     $this->_orm->birthday = Time::dateToUnix($value);
 }