[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
encode-time vs decode-time
From: |
Stefan Monnier |
Subject: |
encode-time vs decode-time |
Date: |
Mon, 29 Jul 2019 12:08:44 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> I think the pair makes sense on the same level as
> {decode,encode}-coding-string does. That is, encoded time is what Emacs
> uses internally for most things, and decoded time is pretty close to
> what you er find in nature.
I think the problem is one of presentation and vocabulary, indeed.
I think we should clarify:
- "time string", as returned by format-time-string and accepted
by parse-time-string.
- "decoded time", i.e. a list of the form (SECOND MINUTE HOUR DAY MONTH YEAR
IGNORED DST ZONE)
I just pushed a patch which defines the `decoded-time` *type*, so we can
refer to that precise name in docstrings.
- "time counted in seconds" for which we support several representations:
a plain number, a list of integers (HIGH LOW USEC PSEC), a pair of
integers (NUMERATOR . DENOMINATOR).
And part of the confusion for me is that `encode-time` not only encodes
time, but can also be used to convert between different representations
of "time counted in seconds" (in which case it's not the inverse of
decode-time).
Stefan
- Support for sub-second time in decoded time, Lars Ingebrigtsen, 2019/07/29
- encode-time vs decode-time,
Stefan Monnier <=
- Re: encode-time vs decode-time, Lars Ingebrigtsen, 2019/07/30
- Re: encode-time vs decode-time, Andy Moreton, 2019/07/30
- Re: encode-time vs decode-time, Lars Ingebrigtsen, 2019/07/30
- Re: encode-time vs decode-time, Paul Eggert, 2019/07/30
- Re: encode-time vs decode-time, Paul Eggert, 2019/07/30
- Re: encode-time vs decode-time, Lars Ingebrigtsen, 2019/07/31
- Re: encode-time vs decode-time, Stefan Monnier, 2019/07/31
Re: Support for sub-second time in decoded time, Eli Zaretskii, 2019/07/29
Re: Support for sub-second time in decoded time, Paul Eggert, 2019/07/29