On 28/2/20 5:53 pm, Steve Mynott wrote:
> I was just wondering what was the significance, if any, of the magic
> time layout as used by time.Parse()?
>
Here's my answer from 2015, long before I started learning Go:
Rob explained this in a thread a fair while back.
> The choice was made by the output of the date command on my Unix
> machine. I should have realized the format varies with locale. Mea
> culpa. But I can still claim it's easy to remember and well
> documented.
Each token is chosen such that it is unique in some way.
So when the parser reaches a token, it can identify it and note the order
in which they occur. This constructs the necessary knowledge we need to
parse a real value.
On Fri, Feb 28, 2020 at 10:53 AM Steve Mynott
wrote:
> I was just
I was just wondering what was the significance, if any, of the magic
time layout as used by time.Parse()?
--
Steve Mynott
cv25519/ECF8B611205B447E091246AF959E3D6197190DD5
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from