ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
PhpOffice\PhpSpreadsheet\Shared\Date Class Reference
+ Collaboration diagram for PhpOffice\PhpSpreadsheet\Shared\Date:

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'
 

Detailed Description

Definition at line 14 of file Date.php.

Member Function Documentation

◆ dateTimeFromTimestamp()

static PhpOffice\PhpSpreadsheet\Shared\Date::dateTimeFromTimestamp ( string  $date,
?DateTimeZone  $timeZone = null 
)
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().

504  : DateTime
505  {
506  $dtobj = DateTime::createFromFormat('U', $date) ?: new DateTime();
507  $dtobj->setTimeZone($timeZone ?? self::getDefaultOrLocalTimezone());
508 
509  return $dtobj;
510  }
+ Here is the caller graph for this function:

◆ dateTimeToExcel()

static PhpOffice\PhpSpreadsheet\Shared\Date::dateTimeToExcel ( DateTimeInterface  $dateValue)
static

Convert a PHP DateTime object to an MS Excel serialized date/time value.

Parameters
DateTimeInterface$dateValuePHP DateTime object
Returns
float MS Excel serialized date/time value

Definition at line 251 of file Date.php.

252  {
253  return self::formattedPHPToExcel(
254  (int) $dateValue->format('Y'),
255  (int) $dateValue->format('m'),
256  (int) $dateValue->format('d'),
257  (int) $dateValue->format('H'),
258  (int) $dateValue->format('i'),
259  (int) $dateValue->format('s')
260  );
261  }

◆ dayStringToNumber()

static PhpOffice\PhpSpreadsheet\Shared\Date::dayStringToNumber (   $day)
static

Strips an ordinal from a numeric value.

Parameters
string$dayDay number with an ordinal
Returns
int|string The integer value with any ordinal stripped, or the original string argument if it isn't a valid numeric

Definition at line 494 of file Date.php.

495  {
496  $strippedDayValue = (str_replace(self::$numberSuffixes, '', $day));
497  if (is_numeric($strippedDayValue)) {
498  return (int) $strippedDayValue;
499  }
500 
501  return $day;
502  }

◆ excelToDateTimeObject()

static PhpOffice\PhpSpreadsheet\Shared\Date::excelToDateTimeObject (   $excelTimestamp,
  $timeZone = null 
)
static

Convert a MS serialized datetime value from Excel to a PHP Date/Time object.

Parameters
float | int$excelTimestampMS Excel serialized date/time value
null | DateTimeZone | string$timeZoneThe 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
Returns
DateTime PHP date/time object

Definition at line 170 of file Date.php.

References $timeZone, PhpOffice\PhpSpreadsheet\Calculation\Functions\COMPATIBILITY_EXCEL, and PhpOffice\PhpSpreadsheet\Calculation\Functions\getCompatibilityMode().

171  {
172  $timeZone = ($timeZone === null) ? self::getDefaultTimezone() : self::validateTimeZone($timeZone);
174  if ($excelTimestamp < 1 && self::$excelCalendar === self::CALENDAR_WINDOWS_1900) {
175  // Unix timestamp base date
176  $baseDate = new DateTime('1970-01-01', $timeZone);
177  } else {
178  // MS Excel calendar base dates
179  if (self::$excelCalendar == self::CALENDAR_WINDOWS_1900) {
180  // Allow adjustment for 1900 Leap Year in MS Excel
181  $baseDate = ($excelTimestamp < 60) ? new DateTime('1899-12-31', $timeZone) : new DateTime('1899-12-30', $timeZone);
182  } else {
183  $baseDate = new DateTime('1904-01-01', $timeZone);
184  }
185  }
186  } else {
187  $baseDate = new DateTime('1899-12-30', $timeZone);
188  }
189 
190  $days = floor($excelTimestamp);
191  $partDay = $excelTimestamp - $days;
192  $hours = floor($partDay * 24);
193  $partDay = $partDay * 24 - $hours;
194  $minutes = floor($partDay * 60);
195  $partDay = $partDay * 60 - $minutes;
196  $seconds = round($partDay * 60);
197 
198  if ($days >= 0) {
199  $days = '+' . $days;
200  }
201  $interval = $days . ' days';
202 
203  return $baseDate->modify($interval)
204  ->setTime((int) $hours, (int) $minutes, (int) $seconds);
205  }
static getCompatibilityMode()
Return the current Compatibility Mode.
Definition: Functions.php:93
+ Here is the call graph for this function:

◆ excelToTimestamp()

static PhpOffice\PhpSpreadsheet\Shared\Date::excelToTimestamp (   $excelTimestamp,
  $timeZone = null 
)
static

Convert a MS serialized datetime value from Excel to a unix timestamp.

Parameters
float | int$excelTimestampMS Excel serialized date/time value
null | DateTimeZone | string$timeZoneThe 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
Returns
int Unix timetamp for this date/time

Definition at line 217 of file Date.php.

References $timeZone.

218  {
219  return (int) self::excelToDateTimeObject($excelTimestamp, $timeZone)
220  ->format('U');
221  }

◆ formattedDateTimeFromTimestamp()

static PhpOffice\PhpSpreadsheet\Shared\Date::formattedDateTimeFromTimestamp ( string  $date,
string  $format,
?DateTimeZone  $timeZone = null 
)
static

Definition at line 512 of file Date.php.

References $timeZone.

512  : string
513  {
514  $dtobj = self::dateTimeFromTimestamp($date, $timeZone);
515 
516  return $dtobj->format($format);
517  }
$format
Definition: metadata.php:141

◆ formattedPHPToExcel()

static PhpOffice\PhpSpreadsheet\Shared\Date::formattedPHPToExcel (   $year,
  $month,
  $day,
  $hours = 0,
  $minutes = 0,
  $seconds = 0 
)
static

formattedPHPToExcel.

Parameters
int$year
int$month
int$day
int$hours
int$minutes
int$seconds
Returns
float Excel date/time value

Definition at line 291 of file Date.php.

Referenced by PhpOffice\PhpSpreadsheet\Reader\Ods\load().

292  {
293  if (self::$excelCalendar == self::CALENDAR_WINDOWS_1900) {
294  //
295  // Fudge factor for the erroneous fact that the year 1900 is treated as a Leap Year in MS Excel
296  // This affects every date following 28th February 1900
297  //
298  $excel1900isLeapYear = true;
299  if (($year == 1900) && ($month <= 2)) {
300  $excel1900isLeapYear = false;
301  }
302  $myexcelBaseDate = 2415020;
303  } else {
304  $myexcelBaseDate = 2416481;
305  $excel1900isLeapYear = false;
306  }
307 
308  // Julian base date Adjustment
309  if ($month > 2) {
310  $month -= 3;
311  } else {
312  $month += 9;
313  --$year;
314  }
315 
316  // Calculate the Julian Date, then subtract the Excel base date (JD 2415020 = 31-Dec-1899 Giving Excel Date of 0)
317  $century = (int) substr($year, 0, 2);
318  $decade = (int) substr($year, 2, 2);
319  $excelDate = floor((146097 * $century) / 4) + floor((1461 * $decade) / 4) + floor((153 * $month + 2) / 5) + $day + 1721119 - $myexcelBaseDate + $excel1900isLeapYear;
320 
321  $excelTime = (($hours * 3600) + ($minutes * 60) + $seconds) / 86400;
322 
323  return (float) $excelDate + $excelTime;
324  }
+ Here is the caller graph for this function:

◆ getDefaultOrLocalTimezone()

static PhpOffice\PhpSpreadsheet\Shared\Date::getDefaultOrLocalTimezone ( )
static

Return the Default timezone, or local timezone if default is not set.

Definition at line 128 of file Date.php.

128  : DateTimeZone
129  {
130  return self::$defaultTimeZone ?? new DateTimeZone(date_default_timezone_get());
131  }

◆ getDefaultTimezone()

static PhpOffice\PhpSpreadsheet\Shared\Date::getDefaultTimezone ( )
static

Return the Default timezone, or UTC if default not set.

Definition at line 120 of file Date.php.

120  : DateTimeZone
121  {
122  return self::$defaultTimeZone ?? new DateTimeZone('UTC');
123  }

◆ getDefaultTimezoneOrNull()

static PhpOffice\PhpSpreadsheet\Shared\Date::getDefaultTimezoneOrNull ( )
static

Return the Default timezone even if null.

Definition at line 136 of file Date.php.

136  : ?DateTimeZone
137  {
138  return self::$defaultTimeZone;
139  }

◆ getExcelCalendar()

static PhpOffice\PhpSpreadsheet\Shared\Date::getExcelCalendar ( )
static

Return the Excel calendar (Windows 1900 or Mac 1904).

Returns
int Excel base date (1900 or 1904)

Definition at line 92 of file Date.php.

Referenced by PhpOffice\PhpSpreadsheet\Writer\Xls\Workbook\writeDateMode(), and PhpOffice\PhpSpreadsheet\Writer\Xlsx\Workbook\writeWorkbookPr().

93  {
94  return self::$excelCalendar;
95  }
+ Here is the caller graph for this function:

◆ isDateTime()

static PhpOffice\PhpSpreadsheet\Shared\Date::isDateTime ( Cell  $pCell)
static

Is a given cell a date/time?

Returns
bool

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().

332  {
333  return is_numeric($pCell->getCalculatedValue()) &&
334  self::isDateTimeFormat(
335  $pCell->getWorksheet()->getStyle(
336  $pCell->getCoordinate()
337  )->getNumberFormat()
338  );
339  }
+ Here is the call graph for this function:

◆ isDateTimeFormat()

static PhpOffice\PhpSpreadsheet\Shared\Date::isDateTimeFormat ( NumberFormat  $pFormat)
static

Is a given number format a date/time?

Returns
bool

Definition at line 346 of file Date.php.

References PhpOffice\PhpSpreadsheet\Style\NumberFormat\getFormatCode().

347  {
348  return self::isDateTimeFormatCode($pFormat->getFormatCode());
349  }
+ Here is the call graph for this function:

◆ isDateTimeFormatCode()

static PhpOffice\PhpSpreadsheet\Shared\Date::isDateTimeFormatCode (   $pFormatCode)
static

Is a given number format code a date/time?

Parameters
string$pFormatCode
Returns
bool

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().

361  {
362  if (strtolower($pFormatCode) === strtolower(NumberFormat::FORMAT_GENERAL)) {
363  // "General" contains an epoch letter 'e', so we trap for it explicitly here (case-insensitive check)
364  return false;
365  }
366  if (preg_match('/[0#]E[+-]0/i', $pFormatCode)) {
367  // Scientific format
368  return false;
369  }
370 
371  // Switch on formatcode
372  switch ($pFormatCode) {
373  // Explicitly defined date formats
396  return true;
397  }
398 
399  // Typically number, currency or accounting (or occasionally fraction) formats
400  if ((substr($pFormatCode, 0, 1) == '_') || (substr($pFormatCode, 0, 2) == '0 ')) {
401  return false;
402  }
403  // Some "special formats" provided in German Excel versions were detected as date time value,
404  // so filter them out here - "\C\H\-00000" (Switzerland) and "\D-00000" (Germany).
405  if (\strpos($pFormatCode, '-00000') !== false) {
406  return false;
407  }
408  // Try checking for any of the date formatting characters that don't appear within square braces
409  if (preg_match('/(^|\])[^\[]*[' . self::$possibleDateFormatCharacters . ']/i', $pFormatCode)) {
410  // We might also have a format mask containing quoted strings...
411  // we don't want to test for any of our characters within the quoted blocks
412  if (strpos($pFormatCode, '"') !== false) {
413  $segMatcher = false;
414  foreach (explode('"', $pFormatCode) as $subVal) {
415  // Only test in alternate array entries (the non-quoted blocks)
416  if (
417  ($segMatcher = !$segMatcher) &&
418  (preg_match('/(^|\])[^\[]*[' . self::$possibleDateFormatCharacters . ']/i', $subVal))
419  ) {
420  return true;
421  }
422  }
423 
424  return false;
425  }
426 
427  return true;
428  }
429 
430  // No date...
431  return false;
432  }
+ Here is the caller graph for this function:

◆ monthStringToNumber()

static PhpOffice\PhpSpreadsheet\Shared\Date::monthStringToNumber (   $month)
static

Converts a month name (either a long or a short name) to a month number.

Parameters
string$monthMonth name or abbreviation
Returns
int|string Month number (1 - 12), or the original string argument if it isn't a valid month name

Definition at line 474 of file Date.php.

475  {
476  $monthIndex = 1;
477  foreach (self::$monthNames as $shortMonthName => $longMonthName) {
478  if (($month === $longMonthName) || ($month === $shortMonthName)) {
479  return $monthIndex;
480  }
481  ++$monthIndex;
482  }
483 
484  return $month;
485  }

◆ PHPToExcel()

static PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel (   $dateValue)
static

Convert a date from PHP to an MS Excel serialized date/time value.

Parameters
mixed$dateValueUnix Timestamp or PHP DateTime object or a string
Returns
bool|float Excel date/time value or boolean FALSE on failure

Definition at line 231 of file Date.php.

Referenced by PhpOffice\PhpSpreadsheet\Reader\Ods\load(), and PhpOffice\PhpSpreadsheet\Reader\Xml\load().

232  {
233  if ((is_object($dateValue)) && ($dateValue instanceof DateTimeInterface)) {
234  return self::dateTimeToExcel($dateValue);
235  } elseif (is_numeric($dateValue)) {
236  return self::timestampToExcel($dateValue);
237  } elseif (is_string($dateValue)) {
238  return self::stringToExcel($dateValue);
239  }
240 
241  return false;
242  }
+ Here is the caller graph for this function:

◆ setDefaultTimezone()

static PhpOffice\PhpSpreadsheet\Shared\Date::setDefaultTimezone (   $timeZone)
static

Set the Default timezone to use for dates.

Parameters
null | DateTimeZone | string$timeZoneThe timezone to set for all Excel datetimestamp to PHP DateTime Object conversions
Returns
bool Success or failure

Definition at line 104 of file Date.php.

References $timeZone.

105  {
106  try {
107  $timeZone = self::validateTimeZone($timeZone);
108  self::$defaultTimeZone = $timeZone;
109  $retval = true;
110  } catch (PhpSpreadsheetException $e) {
111  $retval = false;
112  }
113 
114  return $retval;
115  }

◆ setExcelCalendar()

static PhpOffice\PhpSpreadsheet\Shared\Date::setExcelCalendar (   $baseDate)
static

Set the Excel calendar (Windows 1900 or Mac 1904).

Parameters
int$baseDateExcel base date (1900 or 1904)
Returns
bool Success or failure

Definition at line 73 of file Date.php.

Referenced by PhpOffice\PhpSpreadsheet\Reader\Xlsx\getFromZipArchive(), and PhpOffice\PhpSpreadsheet\Reader\Xls\readDateMode().

74  {
75  if (
76  ($baseDate == self::CALENDAR_WINDOWS_1900) ||
77  ($baseDate == self::CALENDAR_MAC_1904)
78  ) {
79  self::$excelCalendar = $baseDate;
80 
81  return true;
82  }
83 
84  return false;
85  }
+ Here is the caller graph for this function:

◆ stringToExcel()

static PhpOffice\PhpSpreadsheet\Shared\Date::stringToExcel (   $dateValue)
static

Convert a date/time string to Excel time.

Parameters
string$dateValueExamples: '2009-12-31', '2009-12-31 15:59', '2009-12-31 15:59:10'
Returns
false|float Excel date/time serial value

Definition at line 441 of file Date.php.

References PhpOffice\PhpSpreadsheet\Calculation\Functions\VALUE().

Referenced by PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder\bindValue().

442  {
443  if (strlen($dateValue) < 2) {
444  return false;
445  }
446  if (!preg_match('/^(\d{1,4}[ \.\/\-][A-Z]{3,9}([ \.\/\-]\d{1,4})?|[A-Z]{3,9}[ \.\/\-]\d{1,4}([ \.\/\-]\d{1,4})?|\d{1,4}[ \.\/\-]\d{1,4}([ \.\/\-]\d{1,4})?)( \d{1,2}:\d{1,2}(:\d{1,2})?)?$/iu', $dateValue)) {
447  return false;
448  }
449 
450  $dateValueNew = DateTimeExcel\DateValue::fromString($dateValue);
451 
452  if ($dateValueNew === Functions::VALUE()) {
453  return false;
454  }
455 
456  if (strpos($dateValue, ':') !== false) {
457  $timeValue = DateTimeExcel\TimeValue::fromString($dateValue);
458  if ($timeValue === Functions::VALUE()) {
459  return false;
460  }
461  $dateValueNew += $timeValue;
462  }
463 
464  return $dateValueNew;
465  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ timestampToExcel()

static PhpOffice\PhpSpreadsheet\Shared\Date::timestampToExcel (   $dateValue)
static

Convert a Unix timestamp to an MS Excel serialized date/time value.

Parameters
int$dateValueUnix Timestamp
Returns
false|float MS Excel serialized date/time value

Definition at line 270 of file Date.php.

271  {
272  if (!is_numeric($dateValue)) {
273  return false;
274  }
275 
276  return self::dateTimeToExcel(new DateTime('@' . $dateValue));
277  }

◆ validateTimeZone()

static PhpOffice\PhpSpreadsheet\Shared\Date::validateTimeZone (   $timeZone)
staticprivate

Validate a timezone.

Parameters
null | DateTimeZone | string$timeZoneThe timezone to validate, either as a timezone string or object
Returns
?DateTimeZone The timezone as a timezone object

Definition at line 148 of file Date.php.

References $timeZone.

149  {
150  if ($timeZone instanceof DateTimeZone || $timeZone === null) {
151  return $timeZone;
152  }
153  if (in_array($timeZone, DateTimeZone::listIdentifiers(DateTimeZone::ALL_WITH_BC))) {
154  return new DateTimeZone($timeZone);
155  }
156 
157  throw new PhpSpreadsheetException('Invalid timezone');
158  }

Field Documentation

◆ $defaultTimeZone

PhpOffice\PhpSpreadsheet\Shared\Date::$defaultTimeZone
staticprotected

Definition at line 64 of file Date.php.

◆ $excelCalendar

PhpOffice\PhpSpreadsheet\Shared\Date::$excelCalendar = self::CALENDAR_WINDOWS_1900
staticprotected

Definition at line 57 of file Date.php.

◆ $monthNames

PhpOffice\PhpSpreadsheet\Shared\Date::$monthNames
static
Initial value:
= [
'Jan' => 'January'

Definition at line 26 of file Date.php.

◆ $numberSuffixes

PhpOffice\PhpSpreadsheet\Shared\Date::$numberSuffixes
static
Initial value:
= [
'st',
'nd',
'rd',
'th',
]

Definition at line 44 of file Date.php.

◆ $possibleDateFormatCharacters

PhpOffice\PhpSpreadsheet\Shared\Date::$possibleDateFormatCharacters = 'eymdHs'
staticprivate

Definition at line 351 of file Date.php.

◆ CALENDAR_MAC_1904

◆ CALENDAR_WINDOWS_1900

const PhpOffice\PhpSpreadsheet\Shared\Date::CALENDAR_WINDOWS_1900 = 1900

The documentation for this class was generated from the following file: