[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about parse-time-string and date-to-time
From: |
Eric Abrahamsen |
Subject: |
Re: Question about parse-time-string and date-to-time |
Date: |
Wed, 29 Mar 2017 14:18:01 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> A conundrum:
>
> parse-time-string accepts a string representing a date, and parses it
> into a list of time elements, with nil for the unknowns.
>
> date-to-time calls parse-time-string and passes the result straight to
> encode-time, to produce a time value.
>
> encode-time accepts series of time elements, and raises an error if any
> of them are nil.
>
> I might be missing something, but I don't see how date-to-time could
> ever work. Wouldn't it always have to replace the nils with zeros before
> passing the result to encode time?
Or maybe time elements with nils for any of day/month/year are simply
considered invalid?