timeformat

package module
v0.0.0-...-0e29370 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

README

[WIP] -- timeformat

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CFormat

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

CFormat represent C language date time format, such as strftime.

func (*CFormat) Append

func (f *CFormat) Append(bs []byte, t time.Time) []byte

func (CFormat) Parse

func (f CFormat) Parse(value string) (t time.Time, err error)

func (*CFormat) Print

func (f *CFormat) Print(t time.Time) string

type Format

type Format interface {
	Print(time.Time) string
	Parse(value string) (time.Time, error)
}

func C

func C(format string) Format

C returns a C language time format.

func Go

func Go(layout string) Format

Go returns a go time format.

type GoFormat

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

Go represent C language date time format, such as strftime.

func (GoFormat) Parse

func (f GoFormat) Parse(value string) (time.Time, error)

func (GoFormat) Print

func (f GoFormat) Print(t time.Time) string

type JavaFormat

type JavaFormat struct {
}

JavaFormat represent the Java language date time format, such YYMMDD.

Jump to

Keyboard shortcuts

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