unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Arthur Miller <arthur.miller@live.com>
To: Yuri Khan <yuri.v.khan@gmail.com>
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
	"Guu, Jin-Cheng" <jcguu95@gmail.com>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: Shorter and more flexible implementation for parse-time.el
Date: Sun, 25 Jul 2021 12:14:04 +0200	[thread overview]
Message-ID: <AM9PR09MB4977D3FE639AD053F8FCA22A96E79@AM9PR09MB4977.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <CAP_d_8XLQGfv41ZroLNJJYMs-TheQ2g_4HRv4yvvFEKfqFggVg@mail.gmail.com> (Yuri Khan's message of "Sun, 25 Jul 2021 16:58:18 +0700")

Yuri Khan <yuri.v.khan@gmail.com> writes:

> On Sun, 2021-07-25T16:38, Guu, Jin-Cheng <jcguu95@gmail.com> wrote:
>
>> And you're totally right, date parsing as a whole won't be easy. In
>> general we would hope for a parser that is smart enough to deal with
>> flexible formats. However, some specification needs to be given at
>> some point - for example "01/01/01". That is why I came up with an
>> assumption that I think is general enough but also can have a definite
>> output.
>
> The right way to solve the date parsing problem is by getting everyone
> on ISO-8601, not by learning to parse every existing format.
>
> https://xkcd.com/1179/

Indeed, but as we have seen with other standards that will probably
not happen out lifetimes. Americans are still measuring in inches and
Englishman in yars, despite both signing SI convention long, long time
ago ... :).

How interesting/prospectful would it be to get (optional) elisp binding
for the icu library?

https://github.com/unicode-org/icu

http://site.icu-project.org/

It offers lots of translations, date formats, and other locale things.

ICU is likely to be installed on most of desktops since lots of other
software use it, and it has support for binding from C.

Alternatively one can transform their database into something usable
form Emacs, but it's probably more work and would be duplication of the
database which probably is installed somewhere on users computer
anyway.



      reply	other threads:[~2021-07-25 10:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23 17:03 Shorter and more flexible implementation for parse-time.el Guu, Jin-Cheng
2021-07-24 12:12 ` Lars Ingebrigtsen
2021-07-24 15:03   ` Guu, Jin-Cheng
2021-07-25  6:34     ` Lars Ingebrigtsen
2021-07-25  9:38       ` Guu, Jin-Cheng
2021-07-25  9:58         ` Yuri Khan
2021-07-25 10:14           ` Arthur Miller [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=AM9PR09MB4977D3FE639AD053F8FCA22A96E79@AM9PR09MB4977.eurprd09.prod.outlook.com \
    --to=arthur.miller@live.com \
    --cc=emacs-devel@gnu.org \
    --cc=jcguu95@gmail.com \
    --cc=larsi@gnus.org \
    --cc=yuri.v.khan@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).