en

package
v2.48.3 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT, Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var INTEGER_WORDS = map[string]int{
	"one":    1,
	"two":    2,
	"three":  3,
	"four":   4,
	"five":   5,
	"six":    6,
	"seven":  7,
	"eight":  8,
	"nine":   9,
	"ten":    10,
	"eleven": 11,
	"twelve": 12,
}
View Source
var INTEGER_WORDS_PATTERN = `(?:one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve)`
View Source
var MONTH_OFFSET = map[string]int{
	"january":   1,
	"jan":       1,
	"jan.":      1,
	"february":  2,
	"feb":       2,
	"feb.":      2,
	"march":     3,
	"mar":       3,
	"mar.":      3,
	"april":     4,
	"apr":       4,
	"apr.":      4,
	"may":       5,
	"june":      6,
	"jun":       6,
	"jun.":      6,
	"july":      7,
	"jul":       7,
	"jul.":      7,
	"august":    8,
	"aug":       8,
	"aug.":      8,
	"september": 9,
	"sep":       9,
	"sep.":      9,
	"sept":      9,
	"sept.":     9,
	"october":   10,
	"oct":       10,
	"oct.":      10,
	"november":  11,
	"nov":       11,
	"nov.":      11,
	"december":  12,
	"dec":       12,
	"dec.":      12,
}
View Source
var MONTH_OFFSET_PATTERN = `` /* 168-byte string literal not displayed */
View Source
var ORDINAL_WORDS = map[string]int{
	"first":          1,
	"1st":            1,
	"second":         2,
	"2nd":            2,
	"third":          3,
	"3rd":            3,
	"fourth":         4,
	"4th":            4,
	"fifth":          5,
	"5th":            5,
	"sixth":          6,
	"6th":            6,
	"seventh":        7,
	"7th":            7,
	"eighth":         8,
	"8th":            8,
	"ninth":          9,
	"9th":            9,
	"tenth":          10,
	"10th":           10,
	"eleventh":       11,
	"11th":           11,
	"twelfth":        12,
	"12th":           12,
	"thirteenth":     13,
	"13th":           13,
	"fourteenth":     14,
	"14th":           14,
	"fifteenth":      15,
	"15th":           15,
	"sixteenth":      16,
	"16th":           16,
	"seventeenth":    17,
	"17th":           17,
	"eighteenth":     18,
	"18th":           18,
	"nineteenth":     19,
	"19th":           19,
	"twentieth":      20,
	"20th":           20,
	"twenty first":   21,
	"twenty-first":   21,
	"21st":           21,
	"twenty second":  22,
	"twenty-second":  22,
	"22nd":           22,
	"twenty third":   23,
	"twenty-third":   23,
	"23rd":           23,
	"twenty fourth":  24,
	"twenty-fourth":  24,
	"24th":           24,
	"twenty fifth":   25,
	"twenty-fifth":   25,
	"25th":           25,
	"twenty sixth":   26,
	"twenty-sixth":   26,
	"26th":           26,
	"twenty seventh": 27,
	"twenty-seventh": 27,
	"27th":           27,
	"twenty eighth":  28,
	"twenty-eighth":  28,
	"28th":           28,
	"twenty ninth":   29,
	"twenty-ninth":   29,
	"29th":           29,
	"thirtieth":      30,
	"30th":           30,
	"thirty first":   31,
	"thirty-first":   31,
	"31st":           31,
}
View Source
var ORDINAL_WORDS_PATTERN = `` /* 492-byte string literal not displayed */
View Source
var WEEKDAY_OFFSET = map[string]int{
	"sunday":    0,
	"sun":       0,
	"monday":    1,
	"mon":       1,
	"tuesday":   2,
	"tue":       2,
	"wednesday": 3,
	"wed":       3,
	"thursday":  4,
	"thur":      4,
	"thu":       4,
	"friday":    5,
	"fri":       5,
	"saturday":  6,
	"sat":       6,
}
View Source
var WEEKDAY_OFFSET_PATTERN = "(?:sunday|sun|monday|mon|tuesday|tue|wednesday|wed|thursday|thur|thu|friday|fri|saturday|sat)"

Functions

func CasualDate

func CasualDate(s rules.Strategy) rules.Rule

func CasualTime

func CasualTime(s rules.Strategy) rules.Rule

func Deadline

func Deadline(s rules.Strategy) rules.Rule

func ExactMonthDate

func ExactMonthDate(s rules.Strategy) rules.Rule

func Hour

func Hour(s rules.Strategy) rules.Rule

func HourMinute

func HourMinute(s rules.Strategy) rules.Rule

func PastTime

func PastTime(s rules.Strategy) rules.Rule

func Weekday

func Weekday(s rules.Strategy) rules.Rule

Types

This section is empty.

Jump to

Keyboard shortcuts

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