format('d-M-Y'), '31-Jan-2012'); } public function testDATEwith1904Calendar(): void { Date::setExcelCalendar(Date::CALENDAR_MAC_1904); $result = DateTime::DATE(1918, 11, 11); self::assertEquals($result, 5428); } public function testDATEwith1904CalendarError(): void { Date::setExcelCalendar(Date::CALENDAR_MAC_1904); $result = DateTime::DATE(1901, 1, 31); self::assertEquals($result, '#NUM!'); } }