strftime

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package strftime is forked from https://github.com/lestrrat-go/strftime 仅保留针对字符串的 format

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Strftime

type Strftime struct {
	// contains filtered or unexported fields
}

Strftime is the object that represents a compiled strftime pattern

func New

func New(f string) (*Strftime, error)

New creates a new Strftime object. If the compilation fails, then an error is returned in the second argument.

func (*Strftime) FormatString

func (f *Strftime) FormatString(t time.Time) string

FormatString takes the time `t` and formats it, returning the string containing the formated data.

Jump to

Keyboard shortcuts

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