Bug 73693

Summary: Short Year (YY) doesn't work in date format.
Product: kcontrol Reporter: Darrell Esau <desau>
Component: kcmlocaleAssignee: Hans Petter Bieker <bieker>
Status: RESOLVED FIXED    
Severity: normal CC: bda
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: RedHat Enterprise Linux   
OS: Linux   
Latest Commit: Version Fixed In:

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.