This repository has been archived by the owner on May 26, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
56402f6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should have noted, this issue is similar to the one described by [PR #765 Add support for writing date cells Oded Arbel avatar Oded Arbel] on the box/spout master except that PR addressed ODS files and this one addresses XLSX files. I (still) did not look at the code change of PR 765, I made my change independently and only noticed PR 765 after. One should probably look at both of them and integrate both at once.
56402f6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChronicLogic, please note that
$cell->getValue()
may return an object of typeDateInterval
- in which caseformat(DateTime::ATOM)
will result in the unhelpful string value"Y-m-d\TH:i:sP"
. I'm not sure if XSLX has support for time intervals, but otherwise I recommend handling this by throwing an exception so that the caller knows they used an unsupported feature and won't have a nasty surprise later.