PhpSpreadsheet/tests/data/Style
oleibman 7fe5ee84ea Time Interval Formatting
Fix #2768. DateFormatter handles only one of six special formats for time intervals `[h] [hh] [m] [mm] [s] [ss]`. This PR extends support to the rest. There should be no more than one of these in any format string. Although it certainly could make sense to treat `[d] [dd]` in the same manner, Excel does not seem to support those.

Interesting observations - hours and minutes are truncated (presumably because they may be followed by minutes and seconds), but seconds are rounded. Also, there are some floating point issues, which fortunately showed up for the example in the original issue. There, the time interval was 1.15, which should evaluate to a minutes value of 1656 (as it does in Excel). However, on my system it evaluated to 1655 because of a rounding error in the 13th decimal place. To overcome this, values are rounded to 10 decimal places before truncating.
2022-04-23 11:12:46 -07:00
..
Color Additional unit tests for Style Color 2020-11-01 14:23:11 +01:00
ConditionalFormatting Read conditional styling for cell (#2491) 2022-01-22 19:18:26 +01:00
NumberFormat.php Add support for one digit decimals (FORMAT_NUMBER_0, FORMAT_PERCENTAGE_0) (#2525) 2022-02-05 12:46:50 -08:00
NumberFormatDates.php Time Interval Formatting 2022-04-23 11:12:46 -07:00