On Wed, May 5, 2021 at 8:23 PM Bagas Sanjaya <bagasdo...@gmail.com> wrote:

> On 06/05/21 04.37, Ian Lance Taylor wrote:
>   > You wrote 2009 where you need to write 2006.
>
> Wouldn't it possible to define arbitrary reference time and format it
> according to what it would like?
>

If arbitrary literals for the various components were allowed it is certain
to create ambiguities. Especially, when you allow for locale specific
spellings and formatting of the date components.. The Go approach is easier
to understand if you read/speak English but suggests you can replace exact
literals (e.g., "2006") with what seems like an equivalent literal (e.g.,
"2009") rather than the opaque POSIX `%Y`. This is the reason I am not a
fan of the Go approach compared to the POSIX strftime approach (see
https://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html)

-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD8%3DY%3D1%3DtnxY1zhbuUXvdFuSz9o0vPokKUv_KWYytmiu_Q%40mail.gmail.com.

Reply via email to