date

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: BSD-3-Clause Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Date

type Date struct {
	Locale string
	Period Period
	Time   time.Time
}

Date is object that represents the parsed date with useful information.

func (Date) IsZero

func (d Date) IsZero() bool

IsZero reports whether the date is empty or not.

type Period

type Period uint8

Period is representation of confidence level for the parsed date. For example, if the parsed date has period level `Month`, then the parser is only confident up to the month, while the day and time is taken from the current time.

const (
	None Period = iota
	Second
	Minute
	Hour
	Day
	Month
	Year
)

func (Period) IsTime added in v1.2.3

func (p Period) IsTime() bool

func (Period) String

func (p Period) String() string

Jump to

Keyboard shortcuts

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