Well that was simple enough.  Already built into PHP with strftime.

Fixes #289