On Mon, Apr 22, 2013 at 3:27 PM, Dean Schulze <
dean.w....@gmail.com> wrote:
>
> That doesn't say that you can only use that particular date and time. That
> needs to be explicit.
>
> The fact that this question gets asked repeatedly shows that the
> documentation needs to be explicit about this.
I think it is explicit as explicit it can get. If I'm mistaken then
please reformulate the bellow to be "explicit":
[Q]
const (
ANSIC = "Mon Jan _2 15:04:05 2006"
UnixDate = "Mon Jan _2 15:04:05 MST 2006"
RubyDate = "Mon Jan 02 15:04:05 -0700 2006"
RFC822 = "02 Jan 06 15:04 MST"
RFC822Z = "02 Jan 06 15:04 -0700" // RFC822 with numeric zone
RFC850 = "Monday, 02-Jan-06 15:04:05 MST"
RFC1123 = "Mon, 02 Jan 2006 15:04:05 MST"
RFC1123Z = "Mon, 02 Jan 2006 15:04:05 -0700" // RFC1123 with numeric zone
RFC3339 = "2006-01-02T15:04:05Z07:00"
RFC3339Nano = "2006-01-02T15:04:05.999999999Z07:00"
Kitchen = "3:04PM"
// Handy time stamps.
Stamp = "Jan _2 15:04:05"
StampMilli = "Jan _2 15:04:05.000"
StampMicro = "Jan _2 15:04:05.000000"
StampNano = "Jan _2 15:04:05.000000000"
)
These are predefined layouts for use in Time.Format. The standard time
used in the layouts is:
Mon Jan 2 15:04:05 MST 2006
which is Unix time 1136243045. Since MST is GMT-0700, the standard
time can be thought of as
01/02 03:04:05PM '06 -0700
To define your own format, write down what the standard time would
look like formatted your way; see the values of constants like ANSIC,
StampMicro or Kitchen for examples.
[/Q]
-j