Re: [PATCH 2/2] approxidate: allow ISO-like dates far in the future

2014-11-14 Thread Jeff King
On Fri, Nov 14, 2014 at 06:46:19AM +0100, Elia Pinto wrote: [1] http://en.wikipedia.org/wiki/Date_and_time_representation_by_country [2] http://en.wikipedia.org/wiki/Calendar_date Isn't not so good to refer to external resources in a commit message ? It is not good to omit any

Re: [PATCH 2/2] approxidate: allow ISO-like dates far in the future

2014-11-14 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Fri, Nov 14, 2014 at 06:46:19AM +0100, Elia Pinto wrote: [1] http://en.wikipedia.org/wiki/Date_and_time_representation_by_country [2] http://en.wikipedia.org/wiki/Calendar_date Isn't not so good to refer to external resources in a commit message ? It

[PATCH 2/2] approxidate: allow ISO-like dates far in the future

2014-11-13 Thread Jeff King
When we are parsing approxidate strings and we find three numbers separate by one of :/-., we guess that it may be a date. We feed the numbers to match_multi_number, which checks whether it makes sense as a date in various orderings (e.g., dd/mm/yy or mm/dd/yy, etc). One of the checks we do is to

Re: [PATCH 2/2] approxidate: allow ISO-like dates far in the future

2014-11-13 Thread Junio C Hamano
Jeff King p...@peff.net writes: if (c != '.' - is_date(num3, num, num2, refuse_future, now, tm)) + is_date(num3, num, num2, refuse_future, now, tm, 0)) break; Doesn't the new argument '0', which is allow-future, look

Re: [PATCH 2/2] approxidate: allow ISO-like dates far in the future

2014-11-13 Thread Jeff King
On Thu, Nov 13, 2014 at 01:11:46PM -0800, Junio C Hamano wrote: Jeff King p...@peff.net writes: if (c != '.' - is_date(num3, num, num2, refuse_future, now, tm)) + is_date(num3, num, num2, refuse_future, now, tm, 0)) break;

Re: [PATCH 2/2] approxidate: allow ISO-like dates far in the future

2014-11-13 Thread Jeff King
On Thu, Nov 13, 2014 at 04:36:47PM -0500, Jeff King wrote: On Thu, Nov 13, 2014 at 01:11:46PM -0800, Junio C Hamano wrote: Jeff King p...@peff.net writes: if (c != '.' - is_date(num3, num, num2, refuse_future, now, tm)) + is_date(num3, num,

Re: [PATCH 2/2] approxidate: allow ISO-like dates far in the future

2014-11-13 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Thu, Nov 13, 2014 at 01:11:46PM -0800, Junio C Hamano wrote: Jeff King p...@peff.net writes: if (c != '.' - is_date(num3, num, num2, refuse_future, now, tm)) + is_date(num3, num, num2, refuse_future, now, tm, 0))