Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/araddon/dateparse
/ functions
Functions
45 in github.com/araddon/dateparse
⨍
Functions
45
◇
Types & classes
6
↓ 68 callers
Method
set
(start int, val string)
parseany.go:2036
↓ 26 callers
Method
setDay
()
parseany.go:2055
↓ 20 callers
Method
setYear
()
parseany.go:2062
↓ 16 callers
Method
nextIs
(i int, b byte)
parseany.go:2029
↓ 15 callers
Function
ParseAny
ParseAny parse an unknown date format, detect the layout. Normal parse. Equivalent Timezone rules as time.Parse(). NOTE: please see readme on mmdd v
parseany.go:146
↓ 11 callers
Method
setMonth
()
parseany.go:2047
↓ 10 callers
Function
MustParse
MustParse parse a date, and panic if it can't be parsed. Used for testing. Not recommended for most use-cases.
parseany.go:192
↓ 7 callers
Method
parse
func (p *parser) remove(i, length int) { if len(p.format) > i+length { //append(a[:i], a[j:]...) p.format = append(p.format[0:i], p.format[i+leng
parseany.go:2155
↓ 6 callers
Function
ParseIn
ParseIn with Location, equivalent to time.ParseInLocation() timezone/offset rules. Using location arg, if timezone/offset info exists in the datestri
parseany.go:159
↓ 6 callers
Method
coalesceTime
(end int)
parseany.go:2091
↓ 6 callers
Function
parseTime
(datestr string, loc *time.Location, opts ...ParserOption)
parseany.go:235
↓ 6 callers
Method
trimExtra
()
parseany.go:2137
↓ 6 callers
Function
unknownErr
(datestr string)
parseany.go:139
↓ 4 callers
Function
ParseLocal
ParseLocal Given an unknown date format, detect the layout, using time.Local, parse. Set Location to time.Local. Same as ParseIn Location but lazily
parseany.go:182
↓ 4 callers
Function
ParseStrict
ParseStrict parse an unknown date format. IF the date is ambigous mm/dd vs dd/mm then return an error. These return errors: 3.3.2014 , 8/8/71 etc
parseany.go:224
↓ 4 callers
Function
RetryAmbiguousDateWithSwap
RetryAmbiguousDateWithSwap is an option that allows retryAmbiguousDateWithSwap to be changed from its default
parseany.go:2004
↓ 3 callers
Function
PreferMonthFirst
PreferMonthFirst is an option that allows preferMonthFirst to be changed from its default
parseany.go:1996
↓ 2 callers
Function
ParseFormat
ParseFormat parse's an unknown date-time string and returns a layout string that can parse this (and exact same format) other date-time strings. layo
parseany.go:210
↓ 2 callers
Function
fatal
(err error)
dateparse/main.go:128
↓ 2 callers
Function
newParser
(dateStr string, loc *time.Location, opts ...ParserOption)
parseany.go:2011
↓ 2 callers
Function
testDidPanic
(datestr string)
parseany_test.go:476
↓ 1 callers
Method
coalesceDate
(end int)
parseany.go:2069
↓ 1 callers
Method
ds
()
parseany.go:2088
↓ 1 callers
Function
isDay
(alpha string)
parseany.go:2174
↓ 1 callers
Function
isMonthFull
(alpha string)
parseany.go:2182
↓ 1 callers
Function
parseShotgunStyle
(raw string)
bench_test.go:101
↓ 1 callers
Method
setFullMonth
(month string)
parseany.go:2131
↓ 1 callers
Method
ts
()
parseany.go:2085
Function
BenchmarkParseAny
(b *testing.B)
bench_test.go:36
Function
BenchmarkShotgunParse
* go test -bench Parse BenchmarkShotgunParse 50000 37588 ns/op 13258 B/op 167 allocs/op BenchmarkDateparseParseAny 500000 5752
bench_test.go:26
Function
TestInLocation
Lets test to see how this performs using different Timezones/Locations Also of note, try changing your server/machine timezones and repeat !!!!! The
parseany_test.go:619
Function
TestOne
(t *testing.T)
parseany_test.go:11
Function
TestPStruct
(t *testing.T)
parseany_test.go:486
Function
TestParse
(t *testing.T)
parseany_test.go:422
Function
TestParseErrors
(t *testing.T)
parseany_test.go:519
Function
TestParseLayout
(t *testing.T)
parseany_test.go:529
Function
TestParseStrict
(t *testing.T)
parseany_test.go:599
Function
TestPreferMonthFirst
(t *testing.T)
parseany_test.go:728
Function
TestRetryAmbiguousDateWithSwap
(t *testing.T)
parseany_test.go:746
Function
main
()
example/main.go:139
Function
main
()
dateparse/main.go:18
Function
parseAny
(datestr string, loc *time.Location, utc bool)
dateparse/main.go:106
Function
parseIn
(datestr string, loc *time.Location, utc bool)
dateparse/main.go:95
Function
parseLocal
(datestr string, loc *time.Location, utc bool)
dateparse/main.go:83
Function
parseStrict
(datestr string, loc *time.Location, utc bool)
dateparse/main.go:117