Docs For Class PHPExcel_Shared_Date

PHPExcel_Shared

# Class: PHPExcel_Shared_Date

Source Location: /PHPExcel/Shared/Date.php

### Class Overview

PHPExcel_Shared_Date

#### Author(s):

#### Copyright:

- Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

### Variables

- $dateTimeObjectType

### Constants

- CALENDAR_MAC_1904
- CALENDAR_WINDOWS_1900

### Methods

- ExcelToPHP
- ExcelToPHPObject
- FormattedPHPToExcel
- getExcelCalendar
- isDateTime
- isDateTimeFormat
- isDateTimeFormatCode
- PHPToExcel
- setExcelCalendar
- stringToExcel

### Class Details

[line 37]
PHPExcel_Shared_Date

#### Tags:

copyright: | Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

[ Top ]

### Class Variables

#### static $dateTimeObjectType = 'DateTime'

[line 45]

#### Tags:

access: | public

Type: | mixed

[ Top ]

### Class Methods

### static method ExcelToPHP [line 80]

`static long ExcelToPHP( [long $dateValue = 0])`

Convert a date from Excel to PHP

#### Tags:

return: | PHP serialized date/time
access: | public

#### Parameters:

long | $dateValue | Excel date/time value

[ Top ]

### static method ExcelToPHPObject [line 116]

`static long ExcelToPHPObject( [long $dateValue = 0])`

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

#### Tags:

return: | PHP date/time object
access: | public

#### Parameters:

long | $dateValue | Excel date/time value

[ Top ]

### static method FormattedPHPToExcel [line 168]

`static long FormattedPHPToExcel( long $year, long $month, long $day, [long $hours = 0], [long $minutes = 0], [long $seconds = 0])`

FormattedPHPToExcel

#### Tags:

return: | Excel date/time value
access: | public

#### Parameters:

long | $year |
long | $month |
long | $day |
long | $hours |
long | $minutes |
long | $seconds |

[ Top ]

### static method getExcelCalendar [line 69]

`static integer getExcelCalendar( )`

Return the Excel calendar (Windows 1900 or Mac 1904)

#### Tags:

return: | Excel base date
access: | public

[ Top ]

### static method isDateTime [line 207]

`static boolean isDateTime( $pCell)`

Is a given cell a date/time?

#### Tags:

access: | public

#### Parameters:

PHPExcel_Cell | $pCell |

[ Top ]

### static method isDateTimeFormat [line 218]

`static boolean isDateTimeFormat( $pFormat)`

Is a given number format a date/time?

#### Tags:

access: | public

#### Parameters:

PHPExcel_Style_NumberFormat | $pFormat |

[ Top ]

### static method isDateTimeFormatCode [line 231]

`static boolean isDateTimeFormatCode( [string $pFormatCode = ''])`

Is a given number format code a date/time?

#### Tags:

access: | public

#### Parameters:

string | $pFormatCode |

[ Top ]

### static method PHPToExcel [line 138]

`static mixed PHPToExcel( [mixed $dateValue = 0])`

Convert a date from PHP to Excel

#### Tags:

return: | Excel date/time value or boolean False on failure
access: | public

#### Parameters:

mixed | $dateValue | PHP serialized date/time or date object

[ Top ]

### static method setExcelCalendar [line 54]

`static boolean setExcelCalendar( integer $baseDate)`

Set the Excel calendar (Windows 1900 or Mac 1904)

#### Tags:

return: | Success or failure
access: | public

#### Parameters:

integer | $baseDate | Excel base date

[ Top ]

### static method stringToExcel [line 291]

`static float|false stringToExcel( [string $dateValue = ''])`

Convert a date/time string to Excel time

#### Tags:

return: | Excel date/time serial value
access: | public

#### Parameters:

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

[ Top ]

### Class Constants

#### CALENDAR_MAC_1904 = 1904

[line 41]

[ Top ]

#### CALENDAR_WINDOWS_1900 = 1900

[line 40]

constants
[ Top ]

Documentation generated on Sun, 27 Feb 2011 16:29:22 -0800 by phpDocumentor 1.4.3