setting

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: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	// Date order
	DateOrder string

	// Incomplete dates
	CurrentTime          time.Time
	DefaultTimezone      *time.Location
	PreferredDayOfMonth  PreferredDayOfMonth
	PreferredMonthOfYear PreferredMonthOfYear
	PreferredDateSource  PreferredDateSource
	StrictParsing        bool
	RequiredParts        []string

	// Language detection
	SkipTokens       []string
	DefaultLanguages []string

	// Others
	ReturnTimeAsPeriod bool
}

func (Configuration) Clone

func (c Configuration) Clone() *Configuration

type PreferredDateSource

type PreferredDateSource uint8
const (
	CurrentPeriod PreferredDateSource = iota
	Past
	Future
)

type PreferredDayOfMonth

type PreferredDayOfMonth uint8
const (
	Current PreferredDayOfMonth = iota
	First
	Last
)

type PreferredMonthOfYear added in v1.2.2

type PreferredMonthOfYear uint8
const (
	CurrentMonth PreferredMonthOfYear = iota
	FirstMonth
	LastMonth
)

Jump to

Keyboard shortcuts

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