[Lazarus] Extended format codes in FormatDateTime

Werner Pamler werner.pamler at freenet.de
Fri May 16 01:19:15 CEST 2014


In BugTracker, #0026168, I posted a patch to FormatDateTime which allows 
to use hour, minute, or second format codes in square brackets. If such 
codes are found in the format string the values of the corresponding 
quantitites do no longer overflow, but can grow beyond their usual limit 
of 24 (for hours) or 60 (for minutes and seconds). The idea behind that 
is that when adding or subtracting times the hours often become greater 
than 24, but there may be a wish to keep an hh:nn format without days. I 
need that feature in my current work with the fpspreadsheet date/time 
formats since Excel offers this [h]:mm:ss format string. Currently I 
have a patched version in the package, but it certainly would be better 
to have this feature in fpc/Lazarus generally.




More information about the Lazarus mailing list