AUDIT: r17658 - gnucash/trunk/src/app-utils - Bug #557604: Fix date-utilities.scm typos.
Christian Stimming
cstim at cvs.gnucash.org
Sat Oct 25 16:31:13 EDT 2008
Author: cstim
Date: 2008-10-25 16:31:13 -0400 (Sat, 25 Oct 2008)
New Revision: 17658
Trac: http://svn.gnucash.org/trac/changeset/17658
Modified:
gnucash/trunk/src/app-utils/date-utilities.scm
Log:
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.
BP
Modified: gnucash/trunk/src/app-utils/date-utilities.scm
===================================================================
--- gnucash/trunk/src/app-utils/date-utilities.scm 2008-10-25 20:31:06 UTC (rev 17657)
+++ gnucash/trunk/src/app-utils/date-utilities.scm 2008-10-25 20:31:13 UTC (rev 17658)
@@ -610,12 +610,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))))
@@ -624,12 +624,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))))
@@ -637,9 +637,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