@kjk1/

gobook time format

Go

No description

fork
loading
Files
  • main.go

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.534239511076847","path":"main.go","file":{"path":"main.go","content":{"asEncoding":{"base64":"cGFja2FnZSBtYWluCgppbXBvcnQgKAoJImZtdCIKCSJ0aW1lIgopCgpmdW5jIG1haW4oKSB7CgkvLyA6c2hvdyBzdGFydAoJdCA6PSB0aW1lLkRhdGUoMjAxNywgOSwgNCwgMywgMzgsIDQ1LCAwLCB0aW1lLlVUQykKCWZtdC5QcmludGxuKHQuRm9ybWF0KCIyMDA2LTAyLTAxIDE1OjA0OjA1LjAwMCBNU1QiKSkKCWZtdC5QcmludGxuKHQuRm9ybWF0KCIyMDA2LTAyLTEgMTVwbSIpKQoJZm10LlByaW50bG4odC5Gb3JtYXQoIkphbiAwNiBNb24gMiAwMSIpKQoJZm10LlByaW50bG4odC5Gb3JtYXQoIkphbnVhcnkgNiBNb24gMiAxIikpCglmbXQuUHJpbnRsbih0LkZvcm1hdCgiTW9udGg6IEphbiAnMScsICcwMScsIF8yIikpCgkvLyA6c2hvdyBlbmQKfQ=="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package main

import (
	"fmt"
	"time"
)

func main() {
	// :show start
	t := time.Date(2017, 9, 4, 3, 38, 45, 0, time.UTC)
	fmt.Println(t.Format("2006-02-01 15:04:05.000 MST"))
	fmt.Println(t.Format("2006-02-1 15pm"))
	fmt.Println(t.Format("Jan 06 Mon 2 01"))
	fmt.Println(t.Format("January 6 Mon 2 1"))
	fmt.Println(t.Format("Month: Jan '1', '01', _2"))
	// :show end
}