Also, time.Weekday should really be used with the symbolic constants, instead of just writing integer constants. So it doubly doesn't matter :)
On Sat, Sep 10, 2016 at 7:34 PM, <gol...@icarus.freeuk.com> wrote: > > > On Saturday, September 10, 2016 at 4:12:23 AM UTC-7, Sridhar wrote: >> >> Is there any particular reason time.Weekday starts at 0 and time.Month >> starts at 1 ? >> >> I may be missing something - to be consistent can't both these can have >> the same start index ? >> > > They could. > > Humans usually start counting from one. Whilst the idea of which is the > first month changes over time and across cultures (October was the 8th > month and November was the ninth, Latin for 8 and 9 are octo and novem), > dates are written with this 1 based counting for months. > > If time.Month was zero based then everyone would have to add/subtract one > as they converted between a string and numeric representation. > > For days of the week there is even more disagreement over when the week > starts, and people do not frequently refer to the "third day of the week". > So using the normal 0 based indexing of an array is at least reasonable as > there is no strong reason not to. > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.