Mercurial > emacs
changeset 93643:e6a9bdb70ed7
(calendar-iso-to-absolute): Rename calendar-absolute-from-iso.
Update callers, keep old name as alias.
(calendar-iso-print-date): Rename calendar-print-iso-date.
Update callers, keep old name as alias.
(calendar-iso-goto-date): Rename calendar-goto-iso-date.
Keep old name as alias.
(calendar-iso-goto-week): Rename calendar-goto-iso-week.
Keep old name as alias.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Fri, 04 Apr 2008 07:14:38 +0000 |
parents | d01118f40990 |
children | 05a344ce267f |
files | lisp/calendar/cal-iso.el |
diffstat | 1 files changed, 24 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/calendar/cal-iso.el Fri Apr 04 07:12:12 2008 +0000 +++ b/lisp/calendar/cal-iso.el Fri Apr 04 07:14:38 2008 +0000 @@ -33,7 +33,7 @@ (require 'calendar) -(defun calendar-absolute-from-iso (date) +(defun calendar-iso-to-absolute (date) "The number of days elapsed between the Gregorian date 12/31/1 BC and DATE. The `ISO year' corresponds approximately to the Gregorian year, but weeks start on Monday and end on Sunday. The first week of the ISO year is @@ -49,6 +49,9 @@ (* 7 (1- (extract-calendar-month date))) (if (zerop day) 6 (1- day))))) +(define-obsolete-function-alias 'calendar-absolute-from-iso + 'calendar-iso-to-absolute "23.1") + (defun calendar-iso-from-absolute (date) "Compute the `ISO commercial date' corresponding to the absolute DATE. The ISO year corresponds approximately to the Gregorian year, but weeks @@ -62,11 +65,11 @@ (calendar-gregorian-from-absolute (- date 3)))) (year (+ approx (calendar-sum y approx - (>= date (calendar-absolute-from-iso + (>= date (calendar-iso-to-absolute (list 1 1 (1+ y)))) 1)))) (list - (1+ (/ (- date (calendar-absolute-from-iso (list 1 1 year))) 7)) + (1+ (/ (- date (calendar-iso-to-absolute (list 1 1 year))) 7)) (% date 7) year))) @@ -83,12 +86,15 @@ (extract-calendar-year iso-date)))) ;;;###cal-autoload -(defun calendar-print-iso-date () +(defun calendar-iso-print-date () "Show equivalent ISO date for the date under the cursor." (interactive) (message "ISO date: %s" (calendar-iso-date-string (calendar-cursor-to-date t)))) +(define-obsolete-function-alias 'calendar-print-iso-date + 'calendar-iso-print-date "23.1") + (defun calendar-iso-read-date (&optional dayflag) "Interactively read the arguments for an ISO date command. Reads a year and week, and if DAYFLAG is non-nil a day (otherwise @@ -113,25 +119,31 @@ 1))) (list (list week day year)))) -(define-obsolete-function-alias - 'calendar-iso-read-args 'calendar-iso-read-date "23.1") +(define-obsolete-function-alias 'calendar-iso-read-args + 'calendar-iso-read-date "23.1") ;;;###cal-autoload -(defun calendar-goto-iso-date (date &optional noecho) +(defun calendar-iso-goto-date (date &optional noecho) "Move cursor to ISO DATE; echo ISO date unless NOECHO is non-nil." (interactive (calendar-iso-read-date t)) (calendar-goto-date (calendar-gregorian-from-absolute - (calendar-absolute-from-iso date))) - (or noecho (calendar-print-iso-date))) + (calendar-iso-to-absolute date))) + (or noecho (calendar-iso-print-date))) + +(define-obsolete-function-alias 'calendar-goto-iso-date + 'calendar-iso-goto-date "23.1") ;;;###cal-autoload -(defun calendar-goto-iso-week (date &optional noecho) +(defun calendar-iso-goto-week (date &optional noecho) "Move cursor to ISO DATE; echo ISO date unless NOECHO is non-nil. Interactively, goes to the first day of the specified week." (interactive (calendar-iso-read-date)) (calendar-goto-date (calendar-gregorian-from-absolute - (calendar-absolute-from-iso date))) - (or noecho (calendar-print-iso-date))) + (calendar-iso-to-absolute date))) + (or noecho (calendar-iso-print-date))) + +(define-obsolete-function-alias 'calendar-goto-iso-week + 'calendar-iso-goto-week "23.1") (defvar date)