[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: calendar-[beginning/end]-of-year bugged
From: |
Chong Yidong |
Subject: |
Re: calendar-[beginning/end]-of-year bugged |
Date: |
Fri, 4 Mar 2005 20:40:01 -0500 (EST) |
User-agent: |
SquirrelMail/1.4.4 |
>> calendar-beginning-of-year and calendar-end-of-year are buggy. For
>> example:
>>
>> 1. M-x calendar (Suppose it is February 27 2005)
>> 2. M-> (Moves cursor to December 31 2005)
>> 3. M-< (Moves cursor back to February 27 2005)
>> Expected behavior: move cursor to January 1 2005.
>
> This works as it should for me, in the current CVS started with -q
> --no-site-file.
That's because it's March now. The bug shows up when today's date is in
the 3-month period centered around December.
Basically, after calling calendar-other-month you still need to call
calendar-cursor-to-visible-date.
(if (and (= arg 1)
(calendar-date-is-visible-p jan-first))
(calendar-cursor-to-visible-date jan-first)
(calendar-other-month 1 (- year (1- arg))))))