strftime

package module
v0.0.0-...-e74f7c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2019 License: MIT Imports: 2 Imported by: 1

README

go-strftime

Package strftime provides a simple AppendStrftime function similar to time.Time's AppendFormat.

Documentation

GoDoc

Documentation

Overview

Package strftime provides a simple AppendStrftime function similar to time.Time's AppendFormat.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendFormat

func AppendFormat(dst []byte, format string, t time.Time) []byte

AppendFormat appends t to dst according to the input strftime format.

This does not take into account locale; some high level differences:

%E and %O are stripped, as well as a single subsequent alpha char
%x is DD/MM/YY
%c is time.ANSIC

In normal strftime, %a, %A, %b, %B, %c, %p, %P, %r, %x, and %X are all affected by locale. This package hardcodes the implementation to mirror LC_TIME=C (minus %x). Every strftime(3) formatter is accounted for.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL