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: 118 modules, 112 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址