[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#35078: Possible bug in the date command, to do with %p
From: |
Nicholas Joll |
Subject: |
bug#35078: Possible bug in the date command, to do with %p |
Date: |
Wed, 3 Apr 2019 21:08:58 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
Dear all
The following relevant thing has been brought to my attention (by a
Conky developer):
$ man strftime | grep Convert
^ Convert alphabetic characters in result string to
uppercase.
i.e., strftime, which is, I believe, a C function included in the C
'time' library, has an option (which one can use in Conky, actually) to
convert output to all uppercase - thus achieving what I desired. 'Date'
could implement something similar.
Yours
Nicholas
On 03/04/2019 04:08, Eric Blake wrote:
> On 4/2/19 3:22 PM, Nicholas Joll wrote:
>
>> I have two suggestions. (1) Amend the manual such that it says something
>> like the following.
>>
>> %P like %p, but lower case (or uppercase if uppercase is all
>> that the locale provides)
>>
>> (2) Add (and document) a new option that works thusly:
>>
>> %PP locale's implementation of AM/PM (or blank if the locale has
>> no such implementation), forced into uppercase
> We can't spell it %PP (that would be parsed as "%P" "P"), but we could
> take a leaf from %:z (and even %:::z) if we wanted to use : as a flag to
> force particular capitalizations. Of course, even toupper()/tolower()
> are locale-dependent, so it's still hard to say what could really be
> forced if we added particular variants for overriding a locale's
> preferred case.
>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#35078: Possible bug in the date command, to do with %p,
Nicholas Joll <=