yymmdd

package module
v0.0.0-...-7cc815f Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 6 Imported by: 79

Documentation

Index

Constants

View Source
const T_DAY_MARK string = "T_DAY_MARK"
View Source
const T_EOF string = "T_EOF"
View Source
const T_HOUR_MARK string = "T_HOUR_MARK"
View Source
const T_MINUTE_MARK string = "T_MINUTE_MARK"
View Source
const T_MONTH_MARK string = "T_MONTH_MARK"
View Source
const T_RAW_MARK string = "T_RAW_MARK"
View Source
const T_SECOND_MARK string = "T_SECOND_MARK"
View Source
const T_YEAR_MARK string = "T_YEAR_MARK"

Variables

View Source
var EOF string = "+++EOF+++"

EOF character

View Source
var InvalidTimeFormat = errors.New("invalid time format")

Functions

func Format

func Format(time time.Time, layout string) string

func Parse

func Parse(value, format string) (time.Time, error)

Types

type DayFormatter

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

func (*DayFormatter) String

func (self *DayFormatter) String() string

type Formatter

type Formatter struct {
	Items []ItemFormatter
}

func (*Formatter) Format

func (f *Formatter) Format(t time.Time) string

func (*Formatter) Parse

func (f *Formatter) Parse(str string) (time.Time, error)

type HourFormatter

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

func (*HourFormatter) String

func (self *HourFormatter) String() string

type ItemFormatter

type ItemFormatter interface {
	// contains filtered or unexported methods
}

type LexToken

type LexToken [3]string

LexToken holds is a (type, value) array.

func Lexer

func Lexer(input string) (*lexer, []LexToken)

Lexer creates a new scanner for the input string.

type MinuteFormatter

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

func (*MinuteFormatter) String

func (self *MinuteFormatter) String() string

type MonthFormatter

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

func (*MonthFormatter) String

func (self *MonthFormatter) String() string

type SecondFormatter

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

func (*SecondFormatter) String

func (self *SecondFormatter) String() string

type YearFormatter

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

func (*YearFormatter) String

func (y *YearFormatter) String() string

Jump to

Keyboard shortcuts

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