Function: calendar-beginning-of-year
calendar-beginning-of-year is an autoloaded, interactive and
byte-compiled function defined in cal-move.el.gz.
Signature
(calendar-beginning-of-year ARG)
Documentation
Move the cursor backward ARG year beginnings.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/cal-move.el.gz
;;;###cal-autoload
(defun calendar-beginning-of-year (arg)
"Move the cursor backward ARG year beginnings."
(interactive "p")
(calendar-cursor-to-nearest-date)
(let* ((date (calendar-cursor-to-date))
(month (calendar-extract-month date))
(day (calendar-extract-day date))
(year (calendar-extract-year date))
(jan-first (list 1 1 year))
(calendar-move-hook nil))
(if (and (= day 1) (= 1 month))
(calendar-backward-month (* 12 arg))
(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)))
(calendar-cursor-to-visible-date (list 1 1 displayed-year)))))
(run-hooks 'calendar-move-hook))