This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug time/21370] New: RFE: strftime() needs a "convert to titlecase" flag


https://sourceware.org/bugzilla/show_bug.cgi?id=21370

            Bug ID: 21370
           Summary: RFE: strftime() needs a "convert to titlecase" flag
           Product: glibc
           Version: 2.26
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: time
          Assignee: unassigned at sourceware dot org
          Reporter: digitalfreak at lingonborough dot com
  Target Milestone: ---

As suggested in https://bugzilla.gnome.org/show_bug.cgi?id=658807 some
applications need another flag to be supported by strftime().  The flag should
convert the string being output to the titlecase.  By "titlecase" I mean:

- if the first Unicode character is a digraph (or a ligature) then it should be
converted to its titlecase counterpart (the first character is uppercase, the
second is lowercase);
- if the first Unicode character is a regular single letter then it should be
converted to uppercase;
- if it is not a letter or not a lowercase letter then it should not be
modified;
- no other character will be modified.

It has been suggested that the flag character should be "*" (for example "%*A")
but I can't tell why this character has been chosen.  It may be this or another
character.

Currently strftime() supports these similar flags:

- "^" converts all characters to uppercase;
- "#" swaps the case of all characters;
- "^#" should convert all characters to lowercase but it does not - see bug
15527.

This new flag will be useful when formatting dates in probably most of European
languages, except English, German, Greek, and probably few more.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]