Bugfix: Modified PHPExcel_Shared_Date::isDateTimeFormatCode() to return false if format code begins with "_" or with "0 " to prevent false positives

These leading characters are most commonly associated with number, currency or accounting (or occasionally fraction) formats

git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@61632 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
Mark Baker 2010-09-28 15:53:49 +00:00
parent 79f92b2063
commit f0131c0282
2 changed files with 6 additions and 0 deletions

View File

@ -256,6 +256,10 @@ class PHPExcel_Shared_Date
return true;
}
// Typically number, currency or accounting (or occasionally fraction) formats
if ((substr($pFormatCode,0,1) == '_') || (substr($pFormatCode,0,2) == '0 ')) {
return false;
}
// Try checking for any of the date formatting characters that don't appear within square braces
if (preg_match('/(^|\])[^\[]*['.self::$possibleDateFormatCharacters.']/i',$pFormatCode)) {
return true;

View File

@ -46,6 +46,8 @@ Fixed in SVN:
- Bugfix: (MBaker) Workitem 14256 - Worksheet title exception when duplicate worksheet is being renamed but exceeds the 31 character limit
- Bugfix: (MBaker) Workitem 14086 - Named range with sheet name that contains the $ throws exception when getting the cell
- Bugfix: (MBaker) Added autoloader to DefaultValueBinder and AdvancedValueBinder
- Bugfix: (MBaker) Modified PHPExcel_Shared_Date::isDateTimeFormatCode() to return false if format code begins with "_" or with "0 " to prevent false positives
These leading characters are most commonly associated with number, currency or accounting (or occasionally fraction) formats
2010-08-26 (v1.7.4):