From c13facb3dc264bf47a70c2f3c19bec01910fabc3 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Sun, 6 Oct 2019 17:49:15 +0000 Subject: [PATCH] fpspreadsheet: Write lower-case year/month/day symbols ("y"/"m"/"d") to date format strings. Issue #36137. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7152 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/source/common/fpsnumformat.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/fpspreadsheet/source/common/fpsnumformat.pas b/components/fpspreadsheet/source/common/fpsnumformat.pas index 6f4ab9583..2e9d1d674 100644 --- a/components/fpspreadsheet/source/common/fpsnumformat.pas +++ b/components/fpspreadsheet/source/common/fpsnumformat.pas @@ -1473,7 +1473,7 @@ end; string it is replaced by the localized strings FormatSettings.TimeAMString/.TimePMString. - @return Excel-compatible format string + @return Excel-compatible format string -------------------------------------------------------------------------------} function BuildFormatStringFromSection(const ASection: TsNumFormatSection; AllowLocalizedAMPM: Boolean = true): String; @@ -1527,11 +1527,11 @@ begin nftText: if element.TextValue <> '' then result := Result + '"' + element.TextValue + '"'; nftYear: - Result := Result + DupeString('Y', element.IntValue); + Result := Result + DupeString('y', element.IntValue); nftMonth: - Result := Result + DupeString('M', element.IntValue); + Result := Result + DupeString('m', element.IntValue); nftDay: - Result := Result + DupeString('D', element.IntValue); + Result := Result + DupeString('d', element.IntValue); nftHour: if element.IntValue < 0 then Result := Result + '[' + DupeString('h', -element.IntValue) + ']'