private function formatMonths($months, $format = 'F') { $formatted = array(); foreach ($months as $i => $month) { $timestamp = $this->date->makeTime(0, 0, 0, $month, 1, null); $formatted[$i] = $this->date->format($format, $timestamp); } return $formatted; }
/** * Test the formatting function in gregorian */ public function testFormat() { $this->assertEquals($this->datetime->format('j F Y'), date('j F Y')); }