mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-09-03 20:53:02 -05:00
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
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17658 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -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))))
|
||||
|
||||
Reference in New Issue
Block a user