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