Ported strftime from DatetimeJS