[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21229: 24.5; parse-time-string ignore PM/AM
From: |
Nicolas Richard |
Subject: |
bug#21229: 24.5; parse-time-string ignore PM/AM |
Date: |
Tue, 11 Aug 2015 10:32:55 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Tino Calancha <f92capac@gmail.com> writes:
> Maybe parsing "%c" looks too ambitius for the
> freedoom of the output format.
Also FWIW, parse-time-string won't parse (format-time-string "%c"
(current-time)) correctly in many non-english locales because it won't
recognize the month names.
In my french setup:
(format-time-string "%c" (current-time)) => "mar. 11 août 2015 07:34:35 CEST"
"mar" stands for "mardi" (= Tuesday), but will be understood as "March" :
(parse-time-string "mar. 11 août 2015 07:34:35 CEST") => (35 34 7 11 3 2015 nil
nil nil)
> We may need something like:
>
> once you find "am" "pm" look the token: "HH:MM:SS" and ask:
>
> when "pm" and HH < 12: HH ---> HH + 12
Currently parse-time-string works with rules (they are found in
parse-time-rules), each setting one element of a (SEC MIN HOUR DAY MON
YEAR DOW DST TZ) list. When one such element is set, parse-time-string
won't modify it anymore. So we need a small change in the design here if
we want to take PM into account.
--
Nico
- bug#21229: 24.5; parse-time-string ignore PM/AM, Tino Calancha, 2015/08/10
- bug#21229: 24.5; parse-time-string ignore PM/AM, Eli Zaretskii, 2015/08/10
- bug#21229: 24.5; parse-time-string ignore PM/AM, Tino Calancha, 2015/08/10
- bug#21229: 24.5; parse-time-string ignore PM/AM, Eli Zaretskii, 2015/08/10
- bug#21229: 24.5; parse-time-string ignore PM/AM, Tino Calancha, 2015/08/10
- bug#21229: 24.5; parse-time-string ignore PM/AM,
Nicolas Richard <=
- bug#21229: 24.5; parse-time-string ignore PM/AM, Tino Calancha, 2015/08/11
- bug#21229: 24.5; parse-time-string ignore PM/AM, Andreas Schwab, 2015/08/11
- bug#21229: 24.5; parse-time-string ignore PM/AM, Tino Calancha, 2015/08/11
- bug#21229: 24.5; parse-time-string ignore PM/AM, Andreas Schwab, 2015/08/11
- bug#21229: 24.5; parse-time-string ignore PM/AM, Tino Calancha, 2015/08/11
- bug#21229: 24.5; parse-time-string ignore PM/AM, Stefan Monnier, 2015/08/11
- bug#21229: 24.5; parse-time-string ignore PM/AM, Tino Calancha, 2015/08/12
- bug#21229: 24.5; parse-time-string ignore PM/AM, Eli Zaretskii, 2015/08/12
- bug#21229: 24.5; parse-time-string ignore PM/AM, Tino Calancha, 2015/08/12
- bug#21229: 24.5; parse-time-string ignore PM/AM, Nicolas Richard, 2015/08/12