Slightly smarter date parsing?

Thomas Bushnell BSG tb at becket.net
Sun Jan 7 18:09:34 EST 2007


On Sun, 2007-01-07 at 15:16 -0600, Jamuraa wrote:
> I was putting my receipts in for the last half month or so recently
> and noticed that I had to be careful to notice the year that the
> receipts were in.  When putting in 12/23 or similar, I didn't get
> December 23, 2006, but December 23, 2007.  I thought this should be
> different, so I dove into the gnucash code and changed qof_scan_date
> slightly to choose the last year for December if the current month is
> January.  The patch is attached.

This behavior has also always annoyed me.

I can see several ways to solve it.  One, which is yours, seems the
least satisfactory to me.  Here are a couple others:

1) Unless the date is in the "near future", assume it is in the past and
guess the year accordingly.

2) Choose the matching date closest to the present, and set the year
accordingly.

Thomas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20070107/82307c3a/attachment.bin 


More information about the gnucash-devel mailing list