Skip to content


Repository files navigation

Tuesday: Ruby-Compatible Strftime for Go

Travis badge Golangci-lint badge Appveyor badge Coveralls badge Go Report Card badge Godoc badge MIT License

This package provides a function Strftime that is compatible with Ruby's Time.strftime.

It provides additional flags and conversions beyond C stdlib-like strftimes:

  • padding flags, e.g. %-m, %_m, %0e
  • case change flags, e.g. %^A, %#b
  • field widths: %03e, %3N, %9N
  • Ruby-specific conversions such as %s, %N, %:z, %::z

It was developed for use with in Liquid and Gojekyll.


go get # latest snapshot

go get -u # development version



MIT License