/** * Test that date() formats a timestamp to a date. */ public function testDate() { $time = mktime(16, 35, 0, 2, 26, 1988); $this->assertEquals('1988-02-26', Format::date($time)); $this->assertEquals('02/26/1988', Format::date($time, '%m/%d/%Y')); }
/** * {@inheritdoc} */ public static function date($time, $format = '%Y-%m-%d') { return parent::date($time, self::get('date', $format)); }