emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Decoded time accessors


From: Lars Ingebrigtsen
Subject: Re: Decoded time accessors
Date: Mon, 29 Jul 2019 14:29:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Lars Ingebrigtsen <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]