[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 162368] Digital clock widget cannot display date in custom format
From:       James Richard Tyrer <tyrerj () acm ! org>
Date:       2009-07-05 12:46:28
Message-ID: 20090705124628.77ADA14885 () immanuel ! kde ! org
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=162368





--- Comment #28 from James Richard Tyrer <tyrerj acm org>  2009-07-05 14:46:18 ---
(In reply to comment #26)
> Personally I use this patch.

This does not address:

https://bugs.kde.org/show_bug.cgi?id=195837

I am using the code:

    dateString = KGlobal::locale()->formatDate(m_date, m_dateFormat);

to generate the date string.

The header file needs to have:

    KLocale::DateFormat m_dateFormat;

and you need to set "m_dateFormat" to ShortDate or LongDate

It appears to me that some additions need to be made to:

KLocale::formatDate

Specifically to add a bool option for showDayOfWeek and showYear which would be
valid only for:

KLocale::DateFormat.LongDate and KLocale::DateFormat.FancyLongDate

It should be much easier to add this to KDELibs rather than reinventing the
wheel in the DigitalClock widget.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic