[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calendar/cal-iso.el,v
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calendar/cal-iso.el,v |
Date: |
Thu, 13 Mar 2008 03:53:02 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Glenn Morris <gm> 08/03/13 03:53:02
Index: cal-iso.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/calendar/cal-iso.el,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- cal-iso.el 8 Mar 2008 19:59:47 -0000 1.20
+++ cal-iso.el 13 Mar 2008 03:53:02 -0000 1.21
@@ -46,12 +46,12 @@
commercial DATE has the form (week day year) in which week is in the range
1..52 and day is in the range 0..6 (1 = Monday, 2 = Tuesday, ..., 0 =
Sunday). The Gregorian date Sunday, December 31, 1 BC is imaginary."
- (let* ((week (extract-calendar-month date))
- (day (extract-calendar-day date))
- (year (extract-calendar-year date)))
+ (let ((day (extract-calendar-day date)))
(+ (calendar-dayname-on-or-before
- 1 (+ 3 (calendar-absolute-from-gregorian (list 1 1 year))))
- (* 7 (1- week))
+ 1 (+ 3 (calendar-absolute-from-gregorian
+ (list 1 1 (extract-calendar-year date)))))
+ ;; ISO date is (week day year); normally (month day year).
+ (* 7 (1- (extract-calendar-month date)))
(if (zerop day) 6 (1- day)))))
(defun calendar-iso-from-absolute (date)
@@ -76,8 +76,7 @@
;;;###autoload
(defun calendar-iso-date-string (&optional date)
- "String of ISO date of Gregorian DATE.
-Defaults to today's date if DATE is not given."
+ "String of ISO date of Gregorian DATE, default today."
(let* ((d (calendar-absolute-from-gregorian
(or date (calendar-current-date))))
(day (% d 7))
@@ -95,14 +94,14 @@
(calendar-iso-date-string (calendar-cursor-to-date t))))
(defun calendar-iso-read-args (&optional dayflag)
- "Interactively read the arguments for an iso date command.
+ "Interactively read the arguments for an ISO date command.
Reads a year and week, and if DAYFLAG is non-nil a day (otherwise
taken to be 1)."
- (let* ((today (calendar-current-date))
- (year (calendar-read
+ (let* ((year (calendar-read
"ISO calendar year (>0): "
(lambda (x) (> x 0))
- (int-to-string (extract-calendar-year today))))
+ (int-to-string (extract-calendar-year
+ (calendar-current-date)))))
(no-weeks (extract-calendar-month
(calendar-iso-from-absolute
(1-
@@ -120,7 +119,7 @@
;;;###autoload
(defun calendar-goto-iso-date (date &optional noecho)
- "Move cursor to ISO DATE; echo ISO date unless NOECHO is t."
+ "Move cursor to ISO DATE; echo ISO date unless NOECHO is non-nil."
(interactive (calendar-iso-read-args t))
(calendar-goto-date (calendar-gregorian-from-absolute
(calendar-absolute-from-iso date)))
@@ -128,7 +127,7 @@
;;;###autoload
(defun calendar-goto-iso-week (date &optional noecho)
- "Move cursor to ISO DATE; echo ISO date unless NOECHO is t.
+ "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-args))
(calendar-goto-date (calendar-gregorian-from-absolute
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-iso.el,v, Glenn Morris, 2008/03/07
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-iso.el,v, Glenn Morris, 2008/03/07
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-iso.el,v, Glenn Morris, 2008/03/08
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-iso.el,v,
Glenn Morris <=
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-iso.el,v, Glenn Morris, 2008/03/13
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-iso.el,v, Glenn Morris, 2008/03/13
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-iso.el,v, Glenn Morris, 2008/03/24
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-iso.el,v, Glenn Morris, 2008/03/31