klocale patch

CP Hennessy CP.Hennessy at iname.com
Tue Jan 14 15:43:30 GMT 2003


Hi,
	Attached is a new method for klocale which returns a string formated to
the current locale's conventions regarding both date and time, but :
   *   only returns time if currentDate == date from pDateTime;
   *   only returns time and day if (currentDate -7) < date from pDateTime;
   *   otherwise shows same as formatDateTime above

e.g. if the time and date is 15:35:01 14/01/03 then "15:35:01" is returned
if the time and date is 15:35:01 13/01/03 then "Mon 15:35:01" is returned
if the time and date is 15:35:01 03/01/03 then the standard date and time 
string is returned.

If this is already implemented great. 
If not can I added to klocale ?

I have been using this in KNode for the last few months with no problem
and find it quite useful. I'd also like to see it used in KMail.

Thanks
CPH

-------------- next part --------------
A non-text attachment was scrubbed...
Name: klocale.cpp.patch
Type: text/x-diff
Size: 1363 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20030114/65d586df/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: klocale.h.patch
Type: text/x-diff
Size: 1162 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20030114/65d586df/attachment-0001.patch>


More information about the kde-core-devel mailing list