jyrgenn: Blurred head shot from 2007 (Default)
jyrgenn ([personal profile] jyrgenn) wrote2012-09-10 02:27 pm

A strftime() for Go

Recently I complained about the "Go" programming language's time.Format(), which is there because someone found strftime() unappealing.

I find time.Format() unappealing, so I started to write a strftime(). It does all the conversion specifiers, but does not support any modifiers. These should be gracefully ignored, though. Locales are also not supported.

If anyone wants to use it as a starting point to add modifiers and locale support, or just use it as it is, you are welcome. License is BSD-like.

I'd also appreciate any advice how to make it better, more Go-like, more idiomatic.

https://git.w21.org/lib/godate

Post a comment in response:

This account has disabled anonymous posting.
(will be screened if not on Access List)
(will be screened if not on Access List)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting