all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Richard <youngfrog@members.fsf.org>
To: Tino Calancha <f92capac@gmail.com>
Cc: 21229@debbugs.gnu.org
Subject: bug#21229: 24.5; parse-time-string ignore PM/AM
Date: Tue, 11 Aug 2015 10:32:55 +0200	[thread overview]
Message-ID: <87oaieb4y0.fsf@members.fsf.org> (raw)
In-Reply-To: <alpine.LRH.2.20.1508111119050.15071@calancha-ilc.kek.jp> (Tino Calancha's message of "Tue, 11 Aug 2015 11:36:12 +0900 (JST)")

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





  reply	other threads:[~2015-08-11  8:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-10  8:19 bug#21229: 24.5; parse-time-string ignore PM/AM Tino Calancha
2015-08-10 17:29 ` Eli Zaretskii
2015-08-10 17:35   ` Tino Calancha
2015-08-10 17:46     ` Eli Zaretskii
2015-08-11  2:36       ` Tino Calancha
2015-08-11  8:32         ` Nicolas Richard [this message]
2015-08-11 10:37           ` Tino Calancha
2015-08-11 10:40             ` Andreas Schwab
2015-08-11 10:52               ` Tino Calancha
2015-08-11 11:00                 ` Andreas Schwab
2015-08-11 11:47                   ` Tino Calancha
2015-08-11 16:05               ` Stefan Monnier
2015-08-12  5:45                 ` Tino Calancha
2015-08-12 12:39                   ` Eli Zaretskii
2015-08-12 12:46                     ` Tino Calancha
2015-08-12 12:41                   ` Nicolas Richard
2020-08-24 18:35     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oaieb4y0.fsf@members.fsf.org \
    --to=youngfrog@members.fsf.org \
    --cc=21229@debbugs.gnu.org \
    --cc=f92capac@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.