mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-12-04 13:03:19 -05:00
* XFA: time fields are times, not dates (#8411) A dateTimeEdit whose value is a <time/>, or whose picture is a time{…} clause, became a date field formatted yyyy-mm-dd. It is now a time field: its picture becomes an AFTime pattern, its canonical HH:MM:SS data value shows in that pattern, a typed time goes back to the data canonically, and text that isn't a time is kept as typed. Taking the XFA out makes a time field typed in one pattern and shown in another hold its time as shown, as date fields do. Co-Authored-By: Claude Opus 5.5 <[email protected]> * XFA time fields: keep untouched time data; read data canonically (#8411) - A time field still showing the time its data holds keeps that data as it is, so a zone, a fraction or seconds the picture doesn't show survive a save (review on #8607). - A data value is read as a canonical time first, whatever order the picture puts its fields in (`time{HH:SS:MM}`). - A one-letter number in a time pattern takes one digit when the next number needs the other (`905` in `HMM`). - Only a time clause alone makes a time field; `time{…} date{…}` stays a date field. Co-Authored-By: Claude Opus 5.5 <[email protected]> * XFA time fields: read a time pattern in bounded time and depth (#8411) A pattern with more than one hour, minute, second or AM/PM isn't read, so the one-or-two-digit search tries at most eight ways. Literal text is consumed in a loop, so a long run of it no longer means a call per character. The pattern can come from a file's AFTime_KeystrokeEx when the XFA is removed. Co-Authored-By: Claude Opus 5.5 <[email protected]> * XFA time fields: draw the meridiem in upper case, as the picture's A does (#8411) Review on #8607: the value read 2:30 PM while the page drew 2:30 pm, because the appearance went through Acrobat's lower-case tt. An XFA time field (/PCXfaDate) now draws AM/PM; plain AcroForm tt is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Preserve ambiguous XFA times in static conversion * Fix time conversion Clippy warning --------- Co-authored-by: sixparks <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: FredApps <[email protected]> Co-authored-by: FredApps <[email protected]>