Slightly smarter date parsing?

Aaron Larson Aaron at larsonsonline.net
Mon Jan 8 01:48:22 EST 2007


>>>>> "TBB" == Thomas Bushnell BSG <tb at becket.net> writes:
TBB> 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....

TBB> This behavior has also always annoyed me.

Me too.

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

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

Is this something like what you were proposing?

If I type:    I want:
mm/dd/yyyy,   what I typed
mm/dd/yy      a year within 50 of now.  What happens now is ok.
mm/dd         A date within +/- 6 months of now (You could certainly
              argue that 6 is arbitrary and that it should be +2/-10
              or something similar, but symmetry is good for me.
dd            Current month, current year.




More information about the gnucash-devel mailing list