Conversation
…should convert to the "total hours:minutes"
|
Nice work @GreatHumorist I think this will also fix @ivankruchkoff's issue #446 and @garrettgjb's issue #342 as the time format is no longer being stripped by the color |
|
@patrickomeara this is because the color strip code make [h] be stripped, and the time format default replace h as G in date format, which G represent the 24h format in a day, but which you want is the total hours, in excel, the [h] will default convert it to the total hours, but the PhpSpreadsheet have not achieved. |
PowerKiKi
left a comment
There was a problem hiding this comment.
In the test data I see quite a few missing cases. Most notably for colors, and also for elapsed periods as mentioned here: https://support.office.com/en-us/article/format-numbers-as-dates-or-times-418bd3fe-0577-47c8-8caa-b4d30c528309.
Would you mind adding those ?
|
I can add some test cases. @GreatHumorist are you able to resolve the conflicts via rebase or merge first? |
|
@patrickomeara feel free to open a new PR based on this one if @GreatHumorist does not reply |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
|
I ended up adding a few cases myself and merged. Thanks ! |
When using format `[h]:mm` it should convert to the "total hours:minutes" Closes PHPOffice#666 Fixes PHPOffice#664 Fixes PHPOffice#446 Fixes PHPOffice#342
When using format `[h]:mm` it should convert to the "total hours:minutes" Closes PHPOffice#666 Fixes PHPOffice#664 Fixes PHPOffice#446 Fixes PHPOffice#342
This is:
Checklist:
Why this change is needed?
relate issue #664
fix time format for duration is incorrect, when use format [h]:mm it should convert to the "total hours:minutes"