Overview

Packages

  • JAMA
  • None
  • PHP
  • PHPExcel
    • CachedObjectStorage
    • Calculation
    • Cell
    • Chart
      • Renderer
    • Reader
      • Excel2007
      • Excel5
    • RichText
    • Settings
    • Shared
      • Escher
      • OLE
      • Trend
      • ZipArchive
    • Style
    • Worksheet
      • Drawing
    • Writer
      • 2007
      • CSV
      • Excel2007
      • Excel5
      • HTML
      • PDF

Classes

  • PHPExcel_Shared_CodePage
  • PHPExcel_Shared_Date
  • PHPExcel_Shared_Drawing
  • PHPExcel_Shared_Excel5
  • PHPExcel_Shared_File
  • PHPExcel_Shared_Font
  • PHPExcel_Shared_OLERead
  • PHPExcel_Shared_PasswordHasher
  • PHPExcel_Shared_String
  • PHPExcel_Shared_TimeZone
  • PHPExcel_Shared_XMLWriter
  • PHPExcel_Shared_ZipStreamWrapper
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download

Class PHPExcel_Shared_Date

PHPExcel_Shared_Date

Package: PHPExcel\Shared
Category: PHPExcel
Copyright: Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
License: LGPL
Located at controlador/include/phpexcel/PHPExcel/Shared/Date.php
Methods summary
public static boolean
# setExcelCalendar( integer $baseDate )

Set the Excel calendar (Windows 1900 or Mac 1904)

Set the Excel calendar (Windows 1900 or Mac 1904)

Parameters

$baseDate
Excel base date (1900 or 1904)

Returns

boolean
Success or failure
public static integer
# getExcelCalendar( )

Return the Excel calendar (Windows 1900 or Mac 1904)

Return the Excel calendar (Windows 1900 or Mac 1904)

Returns

integer
Excel base date (1900 or 1904)
public static long
# ExcelToPHP( long $dateValue = 0, boolean $adjustToTimezone = FALSE, string $timezone = NULL )

Convert a date from Excel to PHP

Convert a date from Excel to PHP

Parameters

$dateValue
Excel date/time value
$adjustToTimezone

Flag indicating whether $dateValue should be treated as a UST timestamp, or adjusted to UST

$timezone
The timezone for finding the adjustment from UST

Returns

long
PHP serialized date/time
public static integer
# ExcelToPHPObject( integer $dateValue = 0 )

Convert a date from Excel to a PHP Date/Time object

Convert a date from Excel to a PHP Date/Time object

Parameters

$dateValue
Excel date/time value

Returns

integer
PHP date/time object
public static mixed
# PHPToExcel( mixed $dateValue = 0, boolean $adjustToTimezone = FALSE, string $timezone = NULL )

Convert a date from PHP to Excel

Convert a date from PHP to Excel

Parameters

$dateValue
PHP serialized date/time or date object
$adjustToTimezone

Flag indicating whether $dateValue should be treated as a UST timestamp, or adjusted to UST

$timezone
The timezone for finding the adjustment from UST

Returns

mixed

Excel date/time value or boolean FALSE on failure

public static long
# FormattedPHPToExcel( long $year, long $month, long $day, long $hours = 0, long $minutes = 0, long $seconds = 0 )

FormattedPHPToExcel

FormattedPHPToExcel

Parameters

$year
$month
$day
$hours
$minutes
$seconds

Returns

long
Excel date/time value
public static boolean
# isDateTime( PHPExcel_Cell $pCell )

Is a given cell a date/time?

Is a given cell a date/time?

Parameters

$pCell

Returns

boolean
public static boolean
# isDateTimeFormat( PHPExcel_Style_NumberFormat $pFormat )

Is a given number format a date/time?

Is a given number format a date/time?

Parameters

$pFormat

Returns

boolean
public static boolean
# isDateTimeFormatCode( string $pFormatCode = '' )

Is a given number format code a date/time?

Is a given number format code a date/time?

Parameters

$pFormatCode

Returns

boolean
public static float|false
# stringToExcel( string $dateValue = '' )

Convert a date/time string to Excel time

Convert a date/time string to Excel time

Parameters

$dateValue
Examples: '2009-12-31', '2009-12-31 15:59', '2009-12-31 15:59:10'

Returns

float|false
Excel date/time serial value
public static
# monthStringToNumber( $month )
public static
# dayStringToNumber( $day )
Constants summary
integer CALENDAR_WINDOWS_1900

constants

constants

# 1900
integer CALENDAR_MAC_1904
# 1904
Properties summary
public static array $_monthNames
# array( 'Jan' => 'January', 'Feb' => 'February', 'Mar' => 'March', 'Apr' => 'April', 'May' => 'May', 'Jun' => 'June', 'Jul' => 'July', 'Aug' => 'August', 'Sep' => 'September', 'Oct' => 'October', 'Nov' => 'November', 'Dec' => 'December', )
public static array $_numberSuffixes
# array( 'st', 'nd', 'rd', 'th', )
protected static integer $_excelBaseDate
# PHPExcel_Shared_Date::CALENDAR_WINDOWS_1900
private static string $possibleDateFormatCharacters
# 'eymdHs'
Autene API documentation generated by ApiGen