mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Merge from 1.4.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2513 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
79f148e8d9
commit
b584889b9d
@ -150,6 +150,9 @@
|
|||||||
((= (car t1) (car t2)) (<= (cdr t2) (cdr t2)))
|
((= (car t1) (car t2)) (<= (cdr t2) (cdr t2)))
|
||||||
(else #f)))
|
(else #f)))
|
||||||
|
|
||||||
|
(define (gnc:timepair-eq t1 t2)
|
||||||
|
(and (= (car t1) (car t2)) (= (cdr t1) (cdr t2))))
|
||||||
|
|
||||||
;; Build a list of time intervals
|
;; Build a list of time intervals
|
||||||
(define (dateloop curd endd incr)
|
(define (dateloop curd endd incr)
|
||||||
(cond ((gnc:timepair-later curd endd)
|
(cond ((gnc:timepair-later curd endd)
|
||||||
@ -225,28 +228,13 @@
|
|||||||
;; converts it to be midday that day.
|
;; converts it to be midday that day.
|
||||||
|
|
||||||
(define (gnc:timepair-canonical-day-time tp)
|
(define (gnc:timepair-canonical-day-time tp)
|
||||||
(let ((bdt (localtime (car tp))))
|
(let ((bdt (localtime (gnc:timepair->secs tp))))
|
||||||
(set-tm:sec bdt 0)
|
(set-tm:sec bdt 0)
|
||||||
(set-tm:min bdt 0)
|
(set-tm:min bdt 0)
|
||||||
(set-tm:hour bdt 12)
|
(set-tm:hour bdt 12)
|
||||||
(let ((newtime (car (mktime bdt))))
|
(let ((newtime (car (mktime bdt))))
|
||||||
; alert - blarsen@ada-works.com fixed this. you may want to
|
|
||||||
; revert if I'm wrong.
|
|
||||||
(cons newtime 0))))
|
(cons newtime 0))))
|
||||||
|
|
||||||
(define (gnc:timepair-earlier-or-eq-date t1 t2)
|
|
||||||
(let ((time1 (car (gnc:timepair-canonical-day-time t1)))
|
|
||||||
(time2 (car (gnc:timepair-canonical-day-time t2))))
|
|
||||||
(<= time1 time2)))
|
|
||||||
|
|
||||||
(define (gnc:timepair-later-date t1 t2)
|
|
||||||
(let ((time1 (car (gnc:timepair-canonical-day-time t1)))
|
|
||||||
(time2 (car (gnc:timepair-canonical-day-time t2))))
|
|
||||||
(< time1 time2)))
|
|
||||||
|
|
||||||
(define (gnc:timepair-later-or-eq-date t1 t2)
|
|
||||||
(gnc:timepair-earlier-or-eq-date t2 t1))
|
|
||||||
|
|
||||||
(define (gnc:timepair-start-day-time tp)
|
(define (gnc:timepair-start-day-time tp)
|
||||||
(let ((bdt (localtime (gnc:timepair->secs tp))))
|
(let ((bdt (localtime (gnc:timepair->secs tp))))
|
||||||
(set-tm:sec bdt 0)
|
(set-tm:sec bdt 0)
|
||||||
|
@ -294,7 +294,7 @@
|
|||||||
(if ascending?
|
(if ascending?
|
||||||
(lambda (a b) (< (car a) (car b)))
|
(lambda (a b) (< (car a) (car b)))
|
||||||
(lambda (a b) (> (car a) (car b))))
|
(lambda (a b) (> (car a) (car b))))
|
||||||
(lambda (a b) (and (= (car a) (car b)) (= (cadr a) (cadr b))))
|
(lambda (a b) (and (= (car a) (car b)) (= (cdr a) (cdr b))))
|
||||||
#f
|
#f
|
||||||
#f))
|
#f))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user