public static function date($obj = null, $format = 'Y-m-d') { return date($format, $obj ?: time()); }
public function test_date() { $time = time(); $now = date('Y-m-d', $time); $this->assertEquals($now, Helper::date()); $this->assertEquals($now, Helper::date($time)); }