emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el
Date: Mon, 16 May 2005 07:11:51 -0400

Index: emacs/lisp/calendar/diary-lib.el
diff -c emacs/lisp/calendar/diary-lib.el:1.93 
emacs/lisp/calendar/diary-lib.el:1.94
*** emacs/lisp/calendar/diary-lib.el:1.93       Fri Apr  8 11:06:26 2005
--- emacs/lisp/calendar/diary-lib.el    Mon May 16 11:11:48 2005
***************
*** 205,211 ****
    (let (ret)
      (setq ret (cond ((eq type 'string) attrvalue)
                    ((eq type 'symbol) (read attrvalue))
!                   ((eq type 'int) (string-to-int attrvalue))
                    ((eq type 'stringtnil)
                     (cond ((string= "t" attrvalue) t)
                           ((string= "nil" attrvalue) nil)
--- 205,211 ----
    (let (ret)
      (setq ret (cond ((eq type 'string) attrvalue)
                    ((eq type 'symbol) (read attrvalue))
!                   ((eq type 'int) (string-to-number attrvalue))
                    ((eq type 'stringtnil)
                     (cond ((string= "t" attrvalue) t)
                           ((string= "nil" attrvalue) nil)
***************
*** 908,920 ****
                            (buffer-substring-no-properties
                             (match-beginning m-name-pos)
                             (match-end m-name-pos))))
!                      (mm (string-to-int
                            (if m-pos
                                (buffer-substring-no-properties
                                 (match-beginning m-pos)
                                 (match-end m-pos))
                              "")))
!                      (dd (string-to-int
                            (if d-pos
                                (buffer-substring-no-properties
                                 (match-beginning d-pos)
--- 908,920 ----
                            (buffer-substring-no-properties
                             (match-beginning m-name-pos)
                             (match-end m-name-pos))))
!                      (mm (string-to-number
                            (if m-pos
                                (buffer-substring-no-properties
                                 (match-beginning m-pos)
                                 (match-end m-pos))
                              "")))
!                      (dd (string-to-number
                            (if d-pos
                                (buffer-substring-no-properties
                                 (match-beginning d-pos)
***************
*** 931,937 ****
                                 (let* ((current-y
                                         (extract-calendar-year
                                          (calendar-current-date)))
!                                       (y (+ (string-to-int y-str)
                                              (* 100
                                                 (/ current-y 100)))))
                                   (if (> (- y current-y) 50)
--- 931,937 ----
                                 (let* ((current-y
                                         (extract-calendar-year
                                          (calendar-current-date)))
!                                       (y (+ (string-to-number y-str)
                                              (* 100
                                                 (/ current-y 100)))))
                                   (if (> (- y current-y) 50)
***************
*** 939,945 ****
                                     (if (> (- current-y y) 50)
                                         (+ y 100)
                                       y)))
!                              (string-to-int y-str))))
                       (save-excursion
                         (setq entry (buffer-substring-no-properties
                                      (point) (line-end-position))
--- 939,945 ----
                                     (if (> (- current-y y) 50)
                                         (+ y 100)
                                       y)))
!                              (string-to-number y-str))))
                       (save-excursion
                         (setq entry (buffer-substring-no-properties
                                      (point) (line-end-position))
***************
*** 1149,1170 ****
      (cond ((string-match        ; Military time
            "\\`[ 
\t\n\\^M]*\\([0-9]?[0-9]\\)[:.]?\\([0-9][0-9]\\)\\(\\>\\|[^ap]\\)"
              s)
!          (+ (* 100 (string-to-int
                      (substring s (match-beginning 1) (match-end 1))))
!             (string-to-int (substring s (match-beginning 2) (match-end 2)))))
          ((string-match        ; Hour only  XXam or XXpm
            "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)\\([ap]\\)m\\>" s)
!          (+ (* 100 (% (string-to-int
                           (substring s (match-beginning 1) (match-end 1)))
                          12))
              (if (equal ?a (downcase (aref s (match-beginning 2))))
                  0 1200)))
          ((string-match        ; Hour and minute  XX:XXam or XX:XXpm
            "\\`[ 
\t\n\\^M]*\\([0-9]?[0-9]\\)[:.]\\([0-9][0-9]\\)\\([ap]\\)m\\>" s)
!          (+ (* 100 (% (string-to-int
                           (substring s (match-beginning 1) (match-end 1)))
                          12))
!             (string-to-int (substring s (match-beginning 2) (match-end 2)))
              (if (equal ?a (downcase (aref s (match-beginning 3))))
                  0 1200)))
          (t diary-unknown-time)))) ; Unrecognizable
--- 1149,1170 ----
      (cond ((string-match        ; Military time
            "\\`[ 
\t\n\\^M]*\\([0-9]?[0-9]\\)[:.]?\\([0-9][0-9]\\)\\(\\>\\|[^ap]\\)"
              s)
!          (+ (* 100 (string-to-number
                      (substring s (match-beginning 1) (match-end 1))))
!             (string-to-number (substring s (match-beginning 2) (match-end 
2)))))
          ((string-match        ; Hour only  XXam or XXpm
            "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)\\([ap]\\)m\\>" s)
!          (+ (* 100 (% (string-to-number
                           (substring s (match-beginning 1) (match-end 1)))
                          12))
              (if (equal ?a (downcase (aref s (match-beginning 2))))
                  0 1200)))
          ((string-match        ; Hour and minute  XX:XXam or XX:XXpm
            "\\`[ 
\t\n\\^M]*\\([0-9]?[0-9]\\)[:.]\\([0-9][0-9]\\)\\([ap]\\)m\\>" s)
!          (+ (* 100 (% (string-to-number
                           (substring s (match-beginning 1) (match-end 1)))
                          12))
!             (string-to-number (substring s (match-beginning 2) (match-end 2)))
              (if (equal ?a (downcase (aref s (match-beginning 3))))
                  0 1200)))
          (t diary-unknown-time)))) ; Unrecognizable




reply via email to

[Prev in Thread] Current Thread [Next in Thread]