Slightly smarter date parsing?

Andrew Sackville-West ajswest at mindspring.com
Tue Jan 9 12:55:54 EST 2007


On Tue, Jan 09, 2007 at 07:11:21AM +0100, Manfred Usselmann wrote:
> On Mon, 8 Jan 2007 08:26:40 -0800
> Andrew Sackville-West <ajswest at mindspring.com> wrote:
> 
> > On Sun, Jan 07, 2007 at 03:09:34PM -0800, Thomas Bushnell BSG wrote:
> > > 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.
> > 
> > me too! but it only crops up once a year. How long after 1/1 are
> > people still entering 12/xx items? Granted, I routinely enter 50+
> > items from the previous month, so its been particularly annoying. But
> > I think, in terms of gnucash doing exactly what is expected, entering
> > 12/31 and getting 12/31/07 makes sense. It is totally predictable in
> > all cases that the year *will* be the curent year. Anything else would
> > introduce uncertainty in its behavior and that's probably bad IMO. 
> 
> It has also annoyed me several times, but I also agree that the
> program should behave predictable and not guess something. 
> 
> Since I often enter data for the same accounting period and assume a
> lot of people do, my suggestion is to use the date from the last
> entered / changed transaction to complete an partial entered date:
> 
>  - If only the day is entered, use last entered month and year.
>  - If only day and month entered, use last entered year.
>  - Where there is no previous data (first transaction after
>    program startup), use current month and year.
> 
> The advantage of this would be that it would also work for the future
> or more than one year backwards and it would alwasys keep me within the
> date period I'm working on. But the inital default would always be the
> current month even at the beginning of a new year. As soon as I switch
> to a different period the program switches to that period as well.

I like this idea. 

.02

A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20070109/20d6e0a1/attachment.bin 


More information about the gnucash-devel mailing list