r17699 - gnucash/branches/2.2/src/app-utils - [r17658] Bug #557604: Fix date-utilities.scm typos.

Christian Stimming cstim at cvs.gnucash.org
Sat Nov 15 16:41:31 EST 2008


Author: cstim
Date: 2008-11-15 16:41:31 -0500 (Sat, 15 Nov 2008)
New Revision: 17699
Trac: http://svn.gnucash.org/trac/changeset/17699

Modified:
   gnucash/branches/2.2/src/app-utils/date-utilities.scm
Log:
[r17658] Bug #557604: Fix date-utilities.scm typos.

src/app-utils/date-utilities.scm has a few typos ("set:tm-month" instead of
"set:tm-mon" and a few misplaced parens). This is at least as old as 2.2.6 and
still exists on trunk.

Patch by Wolfgang Schnerring, but the first hunk had one parentheses too many; fixed by me.

Modified: gnucash/branches/2.2/src/app-utils/date-utilities.scm
===================================================================
--- gnucash/branches/2.2/src/app-utils/date-utilities.scm	2008-11-15 21:41:22 UTC (rev 17698)
+++ gnucash/branches/2.2/src/app-utils/date-utilities.scm	2008-11-15 21:41:31 UTC (rev 17699)
@@ -583,12 +583,12 @@
   (let ((now (localtime (current-time))))
     (if (< (tm:mon now) 3)
 	(begin
-	  (set:tm-month now (+ (tm:mon now) 12))
+	  (set:tm-mon now (+ (tm:mon now) 12))
 	  (set:tm-year now  (- (tm:year now) 1))))
-    (set:tm-month now (- (tm:mon now) 3))
-    (let ((month-days) (gnc:days-in-month (+ (tm:mon now) 1)
-                                          (+ (tm:year now) 1900)))
-      (if (> (month-days) (tm:mday now))
+    (set:tm-mon now (- (tm:mon now) 3))
+    (let ((month-days (gnc:days-in-month (+ (tm:mon now) 1)
+                                         (+ (tm:year now) 1900))))
+      (if (> month-days (tm:mday now))
 	  (set-tm:mday now month-days))
       (set-tm:isdst now -1)
       (gnc:date->timepair now))))
@@ -597,12 +597,12 @@
   (let ((now (localtime (current-time))))
     (if (< (tm:mon now) 6)
 	(begin
-	  (set:tm-month now (+ (tm:mon now) 12))
+	  (set:tm-mon now (+ (tm:mon now) 12))
 	  (set:tm-year now  (- (tm:year now) 1))))
-    (set:tm-month now (- (tm:mon now) 6))
-    (let ((month-days) (gnc:days-in-month (+ (tm:mon now) 1)
-                                          (+ (tm:year now) 1900)))
-      (if (> (month-days) (tm:mday now))
+    (set:tm-mon now (- (tm:mon now) 6))
+    (let ((month-days (gnc:days-in-month (+ (tm:mon now) 1)
+                                         (+ (tm:year now) 1900))))
+      (if (> month-days (tm:mday now))
 	  (set-tm:mday now month-days))
       (set-tm:isdst now -1)
       (gnc:date->timepair now))))
@@ -610,9 +610,9 @@
 (define (gnc:get-one-year-ago)
   (let ((now (localtime (current-time))))
     (set:tm-year now (- (tm:year now) 1))
-    (let ((month-days) (gnc:days-in-month (+ (tm:mon now) 1)
-                                          (+ (tm:year now) 1900)))
-      (if (> (month-days) (tm:mday now))
+    (let ((month-days (gnc:days-in-month (+ (tm:mon now) 1)
+                                          (+ (tm:year now) 1900))))
+      (if (> month-days (tm:mday now))
 	  (set-tm:mday now month-days))
       (set-tm:isdst now -1)
       (gnc:date->timepair now))))



More information about the gnucash-changes mailing list