[GNC] Scheduled Transaction Calculations

Fred Bone Fred.Bone at dial.pipex.com
Sat Nov 2 10:08:09 EDT 2019


On 01 November 2019 at 12:34, John Ralls said:

[...]
> You could try adding this to fin.scm:
> 
> (load-from-path "gnucash/app-utils")
> (define (gnc:days-in-prev-month) (/ ( + 1 (- (gnc:get-end-prev-month)
> (gnc:get-start-prev-month)))) 86400))

This will produce a non-integer result if
(a) prev month includes daylight-saving-time shift
or
(b) prev month includes a leap second.

(While I'm not familiar with Scheme, if the potential non-integer result 
isn't an issue -- i.e. if it gets auto-rounded to nearest integer -- then 
there was no point in adding the odd second).




More information about the gnucash-user mailing list