ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Static Public Member Functions | |
static | setExcelCalendar ($baseDate) |
Set the Excel calendar (Windows 1900 or Mac 1904). More... | |
static | getExcelCalendar () |
Return the Excel calendar (Windows 1900 or Mac 1904). More... | |
static | setDefaultTimezone ($timeZone) |
Set the Default timezone to use for dates. More... | |
static | getDefaultTimezone () |
Return the Default timezone, or UTC if default not set. More... | |
static | getDefaultOrLocalTimezone () |
Return the Default timezone, or local timezone if default is not set. More... | |
static | getDefaultTimezoneOrNull () |
Return the Default timezone even if null. More... | |
static | excelToDateTimeObject ($excelTimestamp, $timeZone=null) |
Convert a MS serialized datetime value from Excel to a PHP Date/Time object. More... | |
static | excelToTimestamp ($excelTimestamp, $timeZone=null) |
Convert a MS serialized datetime value from Excel to a unix timestamp. More... | |
static | PHPToExcel ($dateValue) |
Convert a date from PHP to an MS Excel serialized date/time value. More... | |
static | dateTimeToExcel (DateTimeInterface $dateValue) |
Convert a PHP DateTime object to an MS Excel serialized date/time value. More... | |
static | timestampToExcel ($dateValue) |
Convert a Unix timestamp to an MS Excel serialized date/time value. More... | |
static | formattedPHPToExcel ($year, $month, $day, $hours=0, $minutes=0, $seconds=0) |
formattedPHPToExcel. More... | |
static | isDateTime (Cell $pCell) |
Is a given cell a date/time? More... | |
static | isDateTimeFormat (NumberFormat $pFormat) |
Is a given number format a date/time? More... | |
static | isDateTimeFormatCode ($pFormatCode) |
Is a given number format code a date/time? More... | |
static | stringToExcel ($dateValue) |
Convert a date/time string to Excel time. More... | |
static | monthStringToNumber ($month) |
Converts a month name (either a long or a short name) to a month number. More... | |
static | dayStringToNumber ($day) |
Strips an ordinal from a numeric value. More... | |
static | dateTimeFromTimestamp (string $date, ?DateTimeZone $timeZone=null) |
static | formattedDateTimeFromTimestamp (string $date, string $format, ?DateTimeZone $timeZone=null) |
Data Fields | |
const | CALENDAR_WINDOWS_1900 = 1900 |
constants More... | |
const | CALENDAR_MAC_1904 = 1904 |
Static Public Attributes | |
static | $monthNames |
static | $numberSuffixes |
Static Protected Attributes | |
static | $excelCalendar = self::CALENDAR_WINDOWS_1900 |
static | $defaultTimeZone |
Static Private Member Functions | |
static | validateTimeZone ($timeZone) |
Validate a timezone. More... | |
Static Private Attributes | |
static | $possibleDateFormatCharacters = 'eymdHs' |
|
static |
Definition at line 504 of file Date.php.
References $timeZone.
Referenced by PhpOffice\PhpSpreadsheet\Writer\Ods\Meta\write(), PhpOffice\PhpSpreadsheet\Writer\Xlsx\DocProps\writeDocPropsCore(), PhpOffice\PhpSpreadsheet\Writer\Ods\Meta\writeDocPropsCustom(), and PhpOffice\PhpSpreadsheet\Writer\Xlsx\DocProps\writeDocPropsCustom().
|
static |
Convert a PHP DateTime object to an MS Excel serialized date/time value.
DateTimeInterface | $dateValue | PHP DateTime object |
|
static |
Strips an ordinal from a numeric value.
string | $day | Day number with an ordinal |
|
static |
Convert a MS serialized datetime value from Excel to a PHP Date/Time object.
float | int | $excelTimestamp | MS Excel serialized date/time value |
null | DateTimeZone | string | $timeZone | The timezone to assume for the Excel timestamp, if you don't want to treat it as a UTC value Use the default (UST) unless you absolutely need a conversion |
Definition at line 170 of file Date.php.
References $timeZone, PhpOffice\PhpSpreadsheet\Calculation\Functions\COMPATIBILITY_EXCEL, and PhpOffice\PhpSpreadsheet\Calculation\Functions\getCompatibilityMode().
|
static |
Convert a MS serialized datetime value from Excel to a unix timestamp.
float | int | $excelTimestamp | MS Excel serialized date/time value |
null | DateTimeZone | string | $timeZone | The timezone to assume for the Excel timestamp, if you don't want to treat it as a UTC value Use the default (UST) unless you absolutely need a conversion |
Definition at line 217 of file Date.php.
References $timeZone.
|
static |
|
static |
formattedPHPToExcel.
int | $year | |
int | $month | |
int | $day | |
int | $hours | |
int | $minutes | |
int | $seconds |
Definition at line 291 of file Date.php.
Referenced by PhpOffice\PhpSpreadsheet\Reader\Ods\load().
|
static |
|
static |
|
static |
Return the Default timezone even if null.
|
static |
Return the Excel calendar (Windows 1900 or Mac 1904).
Definition at line 92 of file Date.php.
Referenced by PhpOffice\PhpSpreadsheet\Writer\Xls\Workbook\writeDateMode(), and PhpOffice\PhpSpreadsheet\Writer\Xlsx\Workbook\writeWorkbookPr().
|
static |
Is a given cell a date/time?
Definition at line 331 of file Date.php.
References PhpOffice\PhpSpreadsheet\Cell\Cell\getCalculatedValue(), PhpOffice\PhpSpreadsheet\Cell\Cell\getCoordinate(), and PhpOffice\PhpSpreadsheet\Cell\Cell\getWorksheet().
|
static |
Is a given number format a date/time?
Definition at line 346 of file Date.php.
References PhpOffice\PhpSpreadsheet\Style\NumberFormat\getFormatCode().
|
static |
Is a given number format code a date/time?
string | $pFormatCode |
Definition at line 360 of file Date.php.
References PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_DATETIME, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_DDMMYYYY, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_DMMINUS, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_DMYMINUS, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_DMYSLASH, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_MYMINUS, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_TIME1, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_TIME2, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_TIME3, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_TIME4, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_TIME5, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_TIME6, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_TIME7, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_TIME8, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_XLSX14, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_XLSX15, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_XLSX16, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_XLSX17, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_XLSX22, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_YYYYMMDD, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_YYYYMMDD2, PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_DATE_YYYYMMDDSLASH, and PhpOffice\PhpSpreadsheet\Style\NumberFormat\FORMAT_GENERAL.
Referenced by PhpOffice\PhpSpreadsheet\Reader\Gnumeric\Styles\readStyles().
|
static |
Converts a month name (either a long or a short name) to a month number.
string | $month | Month name or abbreviation |
|
static |
Convert a date from PHP to an MS Excel serialized date/time value.
mixed | $dateValue | Unix Timestamp or PHP DateTime object or a string |
Definition at line 231 of file Date.php.
Referenced by PhpOffice\PhpSpreadsheet\Reader\Ods\load(), and PhpOffice\PhpSpreadsheet\Reader\Xml\load().
|
static |
|
static |
Set the Excel calendar (Windows 1900 or Mac 1904).
int | $baseDate | Excel base date (1900 or 1904) |
Definition at line 73 of file Date.php.
Referenced by PhpOffice\PhpSpreadsheet\Reader\Xlsx\getFromZipArchive(), and PhpOffice\PhpSpreadsheet\Reader\Xls\readDateMode().
|
static |
Convert a date/time string to Excel time.
string | $dateValue | Examples: '2009-12-31', '2009-12-31 15:59', '2009-12-31 15:59:10' |
Definition at line 441 of file Date.php.
References PhpOffice\PhpSpreadsheet\Calculation\Functions\VALUE().
Referenced by PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder\bindValue().
|
static |
Convert a Unix timestamp to an MS Excel serialized date/time value.
int | $dateValue | Unix Timestamp |
|
staticprivate |
|
staticprotected |
|
staticprotected |
|
static |
|
static |
|
staticprivate |
const PhpOffice\PhpSpreadsheet\Shared\Date::CALENDAR_MAC_1904 = 1904 |
const PhpOffice\PhpSpreadsheet\Shared\Date::CALENDAR_WINDOWS_1900 = 1900 |
constants
Definition at line 17 of file Date.php.
Referenced by PhpOffice\PhpSpreadsheet\Reader\Xlsx\getFromZipArchive(), and PhpOffice\PhpSpreadsheet\Reader\Xls\readDateMode().