Certainly this is a bug that can be found with unit test, however catching a bug early is always better, if this is possible.
Manlio Il giorno giovedì 30 marzo 2017 13:18:35 UTC+2, rog ha scritto: > > Isn't this the kind of thing we write tests for? > > On 29 Mar 2017 22:03, "Manlio Perillo" <manlio....@gmail.com <javascript:>> > wrote: > >> In a program I have a function that formats the time in Italian date >> format: dd/mm/yyyy, but, due to an oversight, I wrote the layout string as >> "02/02/2006", instead of "02/01/2006". >> This caused all the dates to be incorrectly formatted. >> >> IMHO, this is a nasty behavior. The layout is clearly incorrect and the >> implementation should report an error, instead of returning an incorrectly >> formatted time. >> >> >> Thanks >> Manlio >> >> -- >> 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...@googlegroups.com <javascript:>. >> 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.