all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: emacs-devel@gnu.org
Subject: Re: Decoded time accessors
Date: Mon, 29 Jul 2019 14:29:20 +0200	[thread overview]
Message-ID: <m3h875vxb3.fsf@gnus.org> (raw)
In-Reply-To: <m3zhlptzb4.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 07 Jul 2019 21:33:19 +0200")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> A while back we added accessors to the return value from
> `file-attributes' (i.e., `file-attribute-size' etc), and I think that
> was a readability win.
>
> I think we should do the same for the return value for `decode-time',
> but do it as settable values instead:

I proposed some weeks back, and there was one person that didn't like
the idea, while the others who spoke up were either for it or neutral.

I found myself writing a proper ISO 8601 library starting just after
that (to solve a problem with parsing citations in bibtex, which a user
had reported), and while doing that, I found these accessors to be
really handy, so I added them.

While writing the ISO 8601 parsing library (did you know that
"P1Y2M10DT2H30M/2008W32T153000-01" is a valid duration?  ISO 8601
contains multitudes), I also found myself in need of writing functions
to do math on decoded time structures.  This all happened on the
scratch/iso8601 branch.

I've now mashed the work there into two commits -- one for the decoded
time stuff, and one for the ISO 8601 work itself.

The new stuff is documented and NEWS'd, but the documentation probably
needs copy-editing.  And some concept index entries, perhaps...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



      parent reply	other threads:[~2019-07-29 12:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-07 19:33 Decoded time accessors Lars Ingebrigtsen
2019-07-07 19:52 ` Paul Eggert
2019-07-07 20:09   ` Lars Ingebrigtsen
2019-07-07 21:43 ` Alan Mackenzie
2019-07-07 22:20   ` Lars Ingebrigtsen
2019-07-07 22:25   ` Clément Pit-Claudel
2019-07-08 14:41   ` Eli Zaretskii
2019-07-09  0:12   ` Accessor functions vs nth (WAS: Decoded time accessors) Noam Postavsky
2019-07-10 10:02     ` João Távora
2019-07-29 12:29 ` Lars Ingebrigtsen [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

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

  git send-email \
    --in-reply-to=m3h875vxb3.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=emacs-devel@gnu.org \
    /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.