date completion

Geert Janssens janssens-geert at
Tue Jan 11 16:15:08 EST 2011

On Friday 07 January 2011, Peter Selinger wrote:
> OK, I am attaching a patch to add this feature. The patch is against
> -r20032 (because -r20033 generates compiler errors in the budget
> module).
> This patch adds a new option under Edit -> Preferences -> Date/Time
> that looks like this:
>  Date Completion

As one of my last actions for the 2.4 release was trying to remove redundant 
options, I have to ask: does this feature really require an option to enable 
or disable it ?

Can't we just change the code to always use a sliding window that always 
starts 6 months before the current date ?

I mean is there really a benefit to the user to let him make a choice here ?

Personally I would doubt that. Entering invoices/bills more than 6 months in 
the past/future does happen but I will argue that it is equally uncommon as 
entering invoices/bills more than a year in the past/future. The latter case 
already required you to enter full dates, I don't see why the former would 
pose a problem.

It should of course be well documented and be a good candidate for the Tip of 
the day dialog.

Other than that, thanks for your patch !


>  When a date is entered without year, it should be taken:
>  (*) In the current calendar year
>  ( ) In a sliding 12-month window starting this many months before the
>      current month:
>      [ 6 ]
> I tried to follow the GnuCash coding style and conventions. One thing
> I am not sure about is how to tell Guile to set the correct defaults
> for the new preferences, i.e., check the first radio box and set the
> month to "6", when these are used for the first time.
> Also, I added a static auxiliary math function floordiv(a,b) in
> src/libqof/qof/gnc-date.c. I am not sure what is the correct naming
> convention and/or location for such a function.
> Please let me know what you think. -- Peter
Thanks for 

More information about the gnucash-user mailing list