Re: [go-nuts] Re: What is the reason behind time.Parse using a reference time?

2019-08-16 Thread roger peppe
On Fri, 16 Aug 2019 at 01:24, Michael Baldry wrote: > I agree with that. It is an odd choice, as I've never seen any other > library use a reference date like that - there may be many but in 20 years, > I've not seen one. > > I think your argument about Parse is valid, but in most cases, you'll

Re: [go-nuts] Re: What is the reason behind time.Parse using a reference time?

2019-08-16 Thread Wojciech S. Czarnecki
On Thu, 15 Aug 2019 07:52:24 +0100 Michael Baldry wrote: > It's useful to remember the reference time has a pattern, > but the MST, 12 hour clock and it not being in a common order There is no such thing as "common order" of date/time notation. This notation is a part of the local culture. The

Re: [go-nuts] Re: What is the reason behind time.Parse using a reference time?

2019-08-15 Thread Michael Baldry
I agree with that. It is an odd choice, as I've never seen any other library use a reference date like that - there may be many but in 20 years, I've not seen one. I think your argument about Parse is valid, but in most cases, you'll be passing in a variable for the date you are parsing and the

Re: [go-nuts] Re: What is the reason behind time.Parse using a reference time?

2019-08-15 Thread Wojciech S. Czarnecki
On Wed, 14 Aug 2019 19:12:40 -0700 (PDT) sp55aa@gmail.com wrote: > What is the reason behind time.Parse using a reference time? The rationale is that every position of the reference time can be treated as an enum (of int) stating the exact meaning of the field: 01/02 03:04:05PM '06 -0700 1 2