Re: dates and times

From: Dom Lachowicz (
Date: Sun Dec 07 2003 - 16:09:42 EST

  • Next message: Dom Lachowicz: "Commit: 6155 pacifier, IME work"

    Hi Tomas,

    We already have such things, through the magic of
    strftime's arguments. Many of the arguments are
    defined in terms of what is correct "according to the
    current locale." As such, I'm against adding any such
    method to any of our objects. What you want is
    probably '%c' or more likely '%x'.

    What does concern me is that strftime isn't being
    called in a UTF-8 locale, and we're calling something
    effectively equivalent to 'UT_UCS4_strcpy_char' on all
    of them. This is dangerous behavior.


    --- Tomas Frydrych <> wrote:
    > We should really have some way for properly
    > localising strftime()
    > output so we can produce correctly localised basic
    > date and time
    > strings for using in the GUI. It would enough to
    > have just the basic
    > numerical formats (dd/mm/yy vs. mm/dd/yy vs.
    >, etc.).
    > One possibility would be to add const char *
    > getDateFmt() and const
    > char * getTimeFmt() to UT_Locale and these would
    > return correct fmt
    > strings for feeding to strftime(). For maintanence
    > it might be
    > simplest if these strings were in XAP string set,
    > but they could
    > easily be part of the UT_Locale class, as there are
    > not going to be
    > that many of them.
    > Any suggestions?
    > Tomas

    Do you Yahoo!?
    Protect your identity with Yahoo! Mail AddressGuard

    This archive was generated by hypermail 2.1.4 : Sun Dec 07 2003 - 16:08:25 EST