Author: Kevin RodgersKevin Rodgers Date: May 22, 2008 21:47
Kevin Rodgers wrote:
> Johan Bockgård wrote:
>> Xah gmail.com> writes:
>>
>>> is there a function that parses a timestamp like “Monday, Nov. 28,
>>> 1994” so that i can write a function to turn it into the format yyyy-
>>> mm-dd?
>>
>> parse-time-string
>
> (parse-time-string "Monday, Nov. 28, 1994")
> => (nil nil nil 28 11 1994 nil nil nil)
>
> Odd that the leading "Monday, " yields nil DOW... It turns out that is
> due to the fact that the parse-time-weekdays variable only has
> abbreviations (e.g. "mon"), just like parse-time-months. Easy to fix:
>
> (let ((parse-time-weekdays (append parse-time-weekdays
> '(("sunday" . 0)
> ("monday" . 1) ...
|