Source

strftime / README.rst

Full commit

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())

Bugs

The following directive are not supported

%j - Day of year
%U - Week number of the year
%w - Weekday as a decimal number
%W - Week number of the year

License

MIT (see LICENSE.txt)