Re: [HACKERS] [GENERAL] Date conversion using day of week

2012-09-03 Thread Bruce Momjian
Patch applied. --- On Sat, Sep 1, 2012 at 05:14:39PM -0400, Bruce Momjian wrote: [Properly posted to hackers list] On Fri, Apr 1, 2011 at 02:27:02AM +1100, Brendan Jurd wrote: On 1 April 2011 02:00, Adrian Klaver

Re: [HACKERS] [GENERAL] Date conversion using day of week

2012-09-01 Thread Bruce Momjian
[Properly posted to hackers list] On Fri, Apr 1, 2011 at 02:27:02AM +1100, Brendan Jurd wrote: On 1 April 2011 02:00, Adrian Klaver adrian.kla...@gmail.com wrote: On Wednesday, March 30, 2011 8:39:25 pm Brendan Jurd wrote: If we wanted to make it work, then I think the thing to do would be

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Adrian Klaver
On Wednesday, March 30, 2011 8:39:25 pm Brendan Jurd wrote: On 31 March 2011 03:15, Steve Crawford scrawf...@pinpointresearch.com wrote: On 03/29/2011 04:24 PM, Adrian Klaver wrote: ... Well the strange part is only fails for SUN:... test(5432)aklaver=select to_date('2011-13-SUN',

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Brendan Jurd
On 1 April 2011 02:00, Adrian Klaver adrian.kla...@gmail.com wrote: On Wednesday, March 30, 2011 8:39:25 pm Brendan Jurd wrote: If we wanted to make it work, then I think the thing to do would be to add a new set of formatting tokens IDY, IDAY etc.  I don't like the idea of interpreting DY and

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Marc Munro
On Thu, 2011-03-31 at 08:00 -0700, Adrian Klaver wrote: On Wednesday, March 30, 2011 8:39:25 pm Brendan Jurd wrote: On 31 March 2011 03:15, Steve Crawford scrawf...@pinpointresearch.com wrote: On 03/29/2011 04:24 PM, Adrian Klaver wrote: ... Well the strange part is only fails for

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Brendan Jurd
On 1 April 2011 02:35, Marc Munro m...@bloodnok.com wrote: Just to be clear, the reason I was mixing things in this way was that I wanted to validate that the dayname being passed was valid for the current locale, and I could find no easier way of doing it. Ah, I see. In that case I think

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Adrian Klaver
On 03/31/2011 08:27 AM, Brendan Jurd wrote: On 1 April 2011 02:00, Adrian Klaveradrian.kla...@gmail.com wrote: On Wednesday, March 30, 2011 8:39:25 pm Brendan Jurd wrote: If we wanted to make it work, then I think the thing to do would be to add a new set of formatting tokens IDY, IDAY etc.

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Brendan Jurd
On 1 April 2011 03:32, Adrian Klaver adrian.kla...@gmail.com wrote: Now I am confused the docs say: D       day of the week, Sunday(1) to Saturday(7) ID      ISO day of the week, Monday(1) to Sunday(7) This would seem to say they both are one-based but differ on the day that is 1. That's

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Steve Crawford
On 03/31/2011 08:00 AM, Adrian Klaver wrote: On Wednesday, March 30, 2011 8:39:25 pm Brendan Jurd wrote: On 31 March 2011 03:15, Steve Crawfordscrawf...@pinpointresearch.com wrote: On 03/29/2011 04:24 PM, Adrian Klaver wrote: ... Well the strange part is only fails for SUN:...

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Brendan Jurd
On 1 April 2011 04:16, Steve Crawford scrawf...@pinpointresearch.com wrote: This whole discussion opens a #10 sized can o' worms. Admittedly, I don't have good knowledge of any SQL-mandated interpretations of an ISO date - but based on my reading of ISO formatting I see the following issues:

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Steve Crawford
On 03/31/2011 10:51 AM, Brendan Jurd wrote: I agree with your summary of the ISO standards. Unfortunately, to_date and its cohorts are not targeting ISO. They are targeting quasi-compatibility with some Oracle functions of the same name, I suppose to make life easier for folks who are

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Brendan Jurd
On 1 April 2011 05:16, Steve Crawford scrawf...@pinpointresearch.com wrote: Well, to return to the original issue, should we allow the day to be spelled out and fix it (as noted in this thread it is non-standard but also unambiguous and we already allow plenty of non-standard formats) or throw

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-30 Thread Steve Crawford
On 03/29/2011 04:24 PM, Adrian Klaver wrote: ... Well the strange part is only fails for SUN:... test(5432)aklaver=select to_date('2011-13-SUN', 'IYYY-IW-DY'); to_date 2011-03-28 ... You specified Sunday as the day but the date returned is a Monday. I would categorize that as

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-30 Thread Adrian Klaver
On 03/30/2011 09:15 AM, Steve Crawford wrote: On 03/29/2011 04:24 PM, Adrian Klaver wrote: ... Well the strange part is only fails for SUN:... test(5432)aklaver=select to_date('2011-13-SUN', 'IYYY-IW-DY'); to_date 2011-03-28 ... You specified Sunday as the day but the date

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-30 Thread Brendan Jurd
On 31 March 2011 03:15, Steve Crawford scrawf...@pinpointresearch.com wrote: On 03/29/2011 04:24 PM, Adrian Klaver wrote: ... Well the strange part is only fails for SUN:... test(5432)aklaver=select to_date('2011-13-SUN', 'IYYY-IW-DY');   to_date  2011-03-28 ... You