Bug 73693 - Short Year (YY) doesn't work in date format.
Summary: Short Year (YY) doesn't work in date format.
Status: RESOLVED FIXED
Alias: None
Product: kcontrol
Classification: Miscellaneous
Component: kcmlocale (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Hans Petter Bieker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-28 17:39 UTC by Darrell Esau
Modified: 2004-02-18 15:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darrell Esau 2004-01-28 17:39:39 UTC
Version:            (using KDE KDE 3.2.0)
Installed from:    RedHat RPMs
Compiler:          gcc 
OS:          Linux

1) Go to the control center module "Country/Region & Language" (under "Regional & Accessibility").
2) Click on the "Time & Dates" tab.
3) In either the "Short date format" or the "Date format", change the year from "YYYY" to "YY" (as described in the Help Center for this module for "short/two digit year". 
4) Notice that this still displays the date using 4 digits.
Comment 1 Philippe Bourdeu d'Aguerre 2004-02-18 12:16:33 UTC
Same problem with:

Version: KDE 3.2.0
Installed from: source 
Compiler: gcc 3.3.2
OS: Solaris 8
Comment 2 Stephan Kulow 2004-02-18 13:38:12 UTC
CVS commit by coolo: 

fix support for YY aka %y
CCMAIL: 73693-done@bugs.kde.org


  M +2 -2      kcalendarsystem.cpp   1.4.2.1


--- kdelibs/kdecore/kcalendarsystem.cpp  #1.4:1.4.2.1
@@ -79,6 +79,6 @@ QString KCalendarSystem::yearString(cons
 
   sResult.setNum(year(pDate));
-  if (!bShort && sResult.length() == 1 )
-    sResult.prepend('0');
+  if (bShort && sResult.length() == 4 )
+    sResult = sResult.right(2);
 
   return sResult;


Comment 3 Philippe Bourdeu d'Aguerre 2004-02-18 15:48:34 UTC
It works fine.
Thank you.