From: Alex Riesen Date: Sun, 30 Aug 2009 09:56:37 GMT Subject: Re: [PATCH 1/2] Add date formatting and parsing functions relative to a given time Message-ID: <81b0412b0908300256l13d308d9oc30172a20a9f6108@mail.gmail.com> In-Reply-To: <20090830093642.GA30922@coredump.intra.peff.net> On Sun, Aug 30, 2009 at 11:36, Jeff King wrote: > On Sun, Aug 30, 2009 at 05:15:57AM -0400, Jeff King wrote: > >> FYI, I am munging test-date to match the test script I am writing, so >> don't bother with that patch. > > Here is what my patch is looking like. Please give any comments, and > then I will resubmit in a form that will be simpler for Junio, which > should be a series with: > >  - your patch to refactor date.c >  - this patch (this version uses the original interface to >    show_relative; I will tweak to match the new patch you just sent) Yes, I think this is the only comment I can make. > +# arbitrary reference time: 2009-08-30 19:20:00 The world changed since 1980 :) There is already three things happened at the day (http://en.wikipedia.org/wiki/August_2009), and it is not evening yet (well, here in Europe) > +check_show 5 '5 seconds ago' > +check_show 300 '5 minutes ago' > +check_show 18000 '5 hours ago' > +check_show 432000 '5 days ago' > +check_show 1728000 '3 weeks ago' > +check_show 13000000 '5 months ago' > +check_show 37500000 '1 year, 2 months ago' > +check_show 55188000 '1 year, 9 months ago' > +check_show 630000000 '20 years ago' check_show 630000000 '20.years.ago'? (Arbitrary, non-whitespace delimiters, which was an advertised feature, to make shell's life easier)