Source

strftime /

Filename Size Date modified Message
26 B
141 B
13 B
147 B
1.1 KB
668 B
3.6 KB
1.3 KB

strftime For Go

Q: Why, we already have time.Format?

A: Yes, but it becomes tricky to use if if you have string with things other than time in them. (like /path/to/%Y/%m/%d/report)

Installing

go get bitbucket.org/tebeka/strtime

Example

str, err := strftime.Format("%Y/%m/%d", time.Now())

License

MIT (see LICENSE.txt)