The GitHub Actions job "Java CI with Gradle" on poi.git/trunk has succeeded. Run started by GitHub user pjfanning (triggered by pjfanning).
Head commit for run: 220b86e03fb928668913177ab40a384d98022980 / PJ Fanning <[email protected]> CellFormat: Excel-compatible text sections, serial dates, elapsed rounding and mmmmm (#1592) * CellFormat: a single section with a text placeholder (@) also formats text As in Excel, a format such as "ID: "@ or @@ applies to text values. CellFormat used the default text format for any one-section format, so text values were shown unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> * CellFormat: numbers in date sections and Dates in elapsed or number sections CellDateFormatter converted a number with a 1904 epoch and an int of seconds, so a serial date such as 45873.93 failed with "Value out of range". It now converts serial dates with DateUtil (1900 windowing, as CellFormat.apply(Date) assumes). CellFormat.apply(Date) passes the serial number to elapsed and number sections instead of the Date, which they cannot format. This also fixes DataFormatter for multi-section formats with an elapsed section. Co-Authored-By: Claude Opus 5.5 <[email protected]> * CellElapsedFormatter: round elapsed time as a whole Each part was rounded on its own, so 1.145833 shown as [h]:mm:ss gave 27:29:60 and [ss].00 could give a three-digit fraction. The value is now rounded to the smallest unit the format shows and then split, so the rounding carries into the larger parts, as in Excel (27:30:00). Co-Authored-By: Claude Opus 5.5 <[email protected]> * CellDateFormatter: mmmmm is the first letter of the month As in Excel and DataFormatter. It gave the full month name. Co-Authored-By: Claude Opus 5.5 <[email protected]> * CellFormat: keep hour/minute truncation, 1900 dates throughout, per-month mmmmm Follow-up to the CellFormat changes from #1591. CellElapsedFormatter: round to seconds (or the shown fraction of a second) only. Hours and minutes are not rounded up when nothing smaller is shown, so 1:30:45 as [h]:mm stays 1:30, as on trunk and in DataFormatter. CellDateFormatter: a number is a 1900 serial date for every value, including zero, which was still the 1904 epoch. The number is converted in the time zone of the date format, so a cached CellFormat is not hours off after the user time zone changes. DateFormatNumberTests.xlsx was a 1904 workbook; it now uses the 1900 date system, with the expected text to match. CellFormat.apply(Object): a number that is not a valid Excel date (a negative one) in a date section gives the 255 #s that apply(Cell) already gives, instead of an exception. CellDateFormatter: only the mmmmm months of a format are shortened to their initial (mmmm mmmmm gave "A A"), and three or more m are a month even after h or before s. Co-Authored-By: Claude Fable 5.2 <[email protected]> * CellDateFormatter: m is the month again later in a format with hours Any "m" after an "h" was the minutes, however far apart, so hh:mm dd/mm/yyyy showed the minutes in the date. As in Excel, "m" is now the minutes only right after the hours or right before the seconds. Co-Authored-By: Claude Fable 5.2 <[email protected]> * CellFormat: a last section with @ is the text section; text-only formats show numbers as General As in Excel, "ID: "@ applied to 12.5 is 12.5, and in yyyy-mm-dd;@ or 0.0;(0.0);@ the last section is the text section rather than the negative or zero section. A section of literal text only, such as "ZERO", has no text placeholder and stays a number section, so it no longer replaces text values either. Co-Authored-By: Claude Fable 5.2 <[email protected]> --------- Co-authored-by: Denis Kimcherenko <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Report URL: https://github.com/apache/poi/actions/runs/45613690707 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
