Revision 1194747

Go back to digest for 14th November 2010

Optimization in KDE Base

John Layt committed changes in /trunk/KDE/kdelibs/kdecore:

Spilt KCalendarSystem date parsing code out into private KDateTimeParser class.

Also adds support for configurable Short Year Window to apply when parsing the
%y short year, i.e. 10 = 2010. This defaults to 2000 per the current code, but
now can apply different values depending on calendar system, i.e. Hebrew will
pivot on year 5000 instead. I still need to calculate the best defaults for
other calendar systems, that will follow in the freeze.

Unlike the KDateTimeFormatter class, this only has the date code so far, the
time code from KLocale will follow later.

All existing date parsing tests pass, I will seperate the tests out and expand
further during the freeze.

File Changes

Added 2 files
  • /trunk/KDE/kdelibs/kdecore/date
  •   /kdatetimeparser.cpp
  •   /kdatetimeparser_p.h
Modified 19 files
  • /trunk/KDE/kdelibs/kdecore
  •   /CMakeLists.txt
  •   /date/kcalendarsystem.cpp
  •   /date/kcalendarsystem.h
  •   /date/kcalendarsystemcoptic.cpp
  •   /date/kcalendarsystemcopticprivate_p.h
  •   /date/kcalendarsystemethiopian.cpp
  •   /date/kcalendarsystemgregorian.cpp
  •   /date/kcalendarsystemgregorianproleptic.cpp
  •   /date/kcalendarsystemgregorianprolepticprivate_p.h
  •   /date/kcalendarsystemhebrew.cpp
  •   /date/kcalendarsystemhijri.cpp
  •   /date/kcalendarsystemindiannational.cpp
  •   /date/kcalendarsystemjalali.cpp
  •   /date/kcalendarsystemjapanese.cpp
  •   /date/kcalendarsystemjulian.cpp
  •   /date/kcalendarsystemminguo.cpp
  •   /date/kcalendarsystemprivate_p.h
  •   /date/kcalendarsystemthai.cpp
  •   /date/kdatetimeformatter_p.h
21 files changed in total