Aaron Raddon
30cb7ba0f9
new date format, fixes #116
2021-02-05 13:44:33 -08:00
Aaron Raddon
bc0a6620c3
Code cleanup & code-coverage, doc from #120
2021-02-05 13:11:38 -08:00
liushaobo
e92c493a75
完善代码
2021-02-04 15:51:24 +08:00
liushaobo
a7e3619d47
扩充时间格式
2021-02-04 14:23:19 +08:00
liushaobo
b87b24a51f
提交代码
2021-02-03 18:10:39 +08:00
Aaron Raddon
47a9c00c3c
Merge pull request #107 from solidmetanoia/202007031040-zulu-time-and-go-mod
...
Zulu time and go mod
2020-09-30 13:04:56 -07:00
Aaron Raddon
08fc033bf2
fix bad merge
2020-09-30 12:48:48 -07:00
Aaron Raddon
9cb150cd12
Merge pull request #89 from troyspencer/master
...
Options framework to allow more control over parsing
2020-09-30 12:45:49 -07:00
Aaron Raddon
b85a51b06c
Merge branch 'master' into colon-separator
2020-09-30 12:38:26 -07:00
Aaron Raddon
293071ed83
Code cleanup, remove un-used code after #103
2020-09-30 12:17:37 -07:00
solidmetanoia
bf0f7e8812
Zulu time
2020-07-03 19:21:00 +09:00
asannikov
9e5141594f
Add colon date format mm:dd:yy hh:mm:ss
2020-06-17 22:55:25 +02:00
Charles Duffy
661394b510
Parse glibc strftime %c format ( #102 )
...
This change trims day-of-week prefixes before entering into the parsing loop. This corrects parsing of glibc's strftime `%c` timestamps, and should allow significant simplification of the state machine in the future.
2020-05-05 21:10:24 -05:00
troyspencer
d7f7267056
Vendor termtables to fix main.go
...
Add comment for ParserOption
2019-08-13 10:01:04 -05:00
troyspencer
aca798503a
Wrote tests for 100% coverage
...
Update RetryAmbiguousDateWithSwap detection logic after testing
2019-08-12 20:38:23 -05:00
troyspencer
1bdd6d3fc9
Added option retryAmbiguousDateWithSwap
...
Original retry logic by KamalGalrani
Adapted into a deferred function at the source enabled by an option, by me
2019-08-07 22:47:05 -05:00
troyspencer
ae62f1889d
Added options and passthrough to public functions
2019-08-07 22:24:47 -05:00
troyspencer
f8deff45a7
Renamed Option to ParserOption to narrow scope and leave room for other features that may have options
2019-08-07 22:22:19 -05:00
troyspencer
e151913243
Create Option type, and system for loading options
...
Created PreferMonthFirst option, which exposes preferMonthFirst in a backwards compatible manner with optional spread functions that operate on the parser when it's being constructed
2019-08-07 22:12:45 -05:00
troyspencer
d530bcec9b
Changes to the algorithm to handle when preferMonthFirst is false
...
Credit for this to KamalGalrani
2019-08-07 22:10:40 -05:00
Philippe Horne
dd780a39a3
Added fix to parse dates of the format 28-Feb-18 and 28-Feb-2018.
2019-06-19 13:28:39 -04:00
ferhat elmas
b0e14136e9
Fix ordinal parsing due to copy
2019-04-26 01:42:47 +02:00
Eli Treuherz
3f294935c0
Fix typo in "unrecognised format" error
2019-04-25 09:12:58 +01:00
Aaron Raddon
262228af70
code coverage
2019-02-22 17:01:37 -08:00
Aaron Raddon
c4a7a0dec4
new format closes #76
2019-02-22 16:50:43 -08:00
Aaron Raddon
21df004e09
Additional missed format for refs #74 date format with rd
2018-11-23 09:12:28 -08:00
Aaron Raddon
313f117957
new date formats closes #73 and closes #74
2018-11-22 13:54:48 -08:00
Aaron Raddon
00e168d348
fix date "1 July 2013" closes #70
2018-10-20 12:01:51 -07:00
Aaron Raddon
303fede690
merge master
2018-10-09 20:55:28 -07:00
Aaron Raddon
700250988b
new format closes #69
2018-10-09 20:50:09 -07:00
Aaron Raddon
cfd92a431d
Fix time-zone for certain formats closes #68
2018-07-29 10:48:19 -07:00
Aaron Raddon
a95177ee19
parse yyyyMMddhhmmss digit format closes #65
2018-07-21 14:28:33 -07:00
Aaron Raddon
089f77b1d9
Add unit test for format for #62
2018-07-10 18:53:48 -07:00
Aaron Raddon
b703960732
Support 4 day month: "sept. 28, 2017" closes #62
2018-07-10 18:51:27 -07:00
Aaron Raddon
89c8cfc1bf
parse dates with double offsets, closes #64
2018-06-30 10:20:13 -07:00
Aaron Raddon
52b556944e
support jun. 7, 1985 format closes #61
2018-06-08 18:01:07 -07:00
Aaron Raddon
4c29e1d266
bug in June 2, 2018 format, short full month. closes #60
2018-06-05 18:01:57 -07:00
Aaron Raddon
5025a49c02
new format april 3, 2018 closes #59
2018-05-23 21:11:15 -07:00
Aaron Raddon
26506dc7a8
add new yyyy.mm format closes #58
2018-05-03 18:06:52 -07:00
Aaron Raddon
4b079c6fdd
tests to ensure more bad formats fail
2018-04-18 17:36:22 -07:00
Aaron Raddon
b0e7f69efa
allow golangs wierd m=+0.00000 offset closes #57
2018-04-17 14:16:01 -07:00
Aaron Raddon
b8014f0dba
fix "3" too short for date, force error closes #56
2018-04-09 18:54:05 -07:00
Aaron Raddon
f40887f3bf
new format(no seconds) closes #58
2018-04-06 06:57:28 -07:00
Aaron Raddon
1d3842569f
improve godoc
2018-03-25 16:48:11 -07:00
Aaron Raddon
fd8f11d211
parse strict refs #28
2018-03-24 17:49:27 -07:00
Aaron Raddon
d43304005d
parse format refs #33
2018-03-24 15:56:26 -07:00
Aaron Raddon
cc9d69bbea
New date format September 17, 2012... closes #49
2018-03-15 19:06:38 -07:00
Aaron Raddon
c9a50ad15e
add missing 07 Feb 2004 09:07:05 format
2018-03-11 19:00:26 -07:00
Aaron Raddon
942c3ab04f
Refactor time/date parsing
2018-03-11 17:39:59 -07:00
Aaron Raddon
7b436dd68b
test-harness
2018-03-11 14:08:21 -07:00
Aaron Raddon
a653ec7165
More date formats closes #46
2018-03-10 13:43:16 -08:00
Aaron Raddon
62e766bf9e
easier parsing of comma milliseconds
2018-03-10 13:05:55 -08:00
Aaron Raddon
163a0a8ac8
Complete refactor for re-usable time parse
2018-03-10 11:50:19 -08:00
Aaron Raddon
e152c5aaf6
Dateparse refactor to split time/date
2018-03-01 18:36:46 -08:00
Aaron Raddon
20cd681f46
time-parse fixes
2018-02-27 20:05:14 -08:00
Aaron Raddon
7825aa09f1
Dateparse seperate time, date parsing
2018-02-25 22:46:45 -08:00
Aaron Raddon
13b1994d70
split into date, time partial parsing
2018-02-25 16:35:33 -08:00
Aaron Raddon
3fd9518a70
Fix a bad parse date, closes #40
2018-02-13 20:44:26 -08:00
Aaron Raddon
036f821411
fix time-zone of "Fri, 5 Jan 2018 14:09:32 -0700 (MST)" format closes #39
2018-02-09 18:08:04 -08:00
Aaron Raddon
a7818d843a
Add format 02 Jan 2018 23:59 closes #38
2018-02-08 12:52:03 -08:00
shirHornstein
f08fe4265b
support more formats with one digits
2018-02-08 17:03:45 +02:00
Aaron Raddon
f912f7e43f
new format "2 January 2006" closes #36
2018-01-24 18:00:51 -08:00
Aaron Raddon
afa6a0f934
mm.dd.yyyy format closes #34 (pr #35 )
2018-01-11 13:21:04 -08:00
Aaron Raddon
031c380915
new date format closes #32
2018-01-04 23:08:24 -08:00
Aaron Raddon
39fde9de9e
new format: 2017-12-11 10:16 no seconds closes #31
2017-12-11 10:53:38 -08:00
Aaron Raddon
f30ca3179c
Support Chinese Date Format
2017-11-18 11:07:33 -08:00
Aaron Raddon
3007e2ec4a
4/15/06 22:05 format closes #30
2017-11-18 10:21:24 -08:00
Aaron Raddon
ca7e753bd1
Dont allow unix-seconds to be negative
2017-10-07 09:34:59 -07:00
Aaron Raddon
6da1fef9ab
add pkg doc
2017-10-04 03:50:25 -07:00
Aaron Raddon
e2f3c465e9
ensure second, millisecond ints as dates use location
2017-08-26 14:12:55 -07:00
Aaron Raddon
0d88e220f9
Improve golint happiness
2017-08-12 09:50:14 -07:00
Aaron Raddon
febb340f9d
Improve golint happiness
2017-08-12 09:48:28 -07:00
Aaron Raddon
a1537bb044
Doc improvements
2017-07-26 22:39:44 -07:00
Aaron Raddon
66fb8cfe35
Doc improvements
2017-07-26 22:37:37 -07:00
Aaron Raddon
6e540a639f
state constants dont need to be public
2017-07-26 18:27:53 -07:00
Aaron Raddon
11f69fe6d8
state constants dont need to be public
2017-07-26 18:26:57 -07:00
Aaron Raddon
7dedf040d6
Improve doc on time.Location usage
2017-07-26 17:08:58 -07:00
Aaron Raddon
3e1f751fed
new date format for 2013-Feb-03
2017-07-26 16:55:21 -07:00
Aaron Raddon
0e522cd409
Parse In Location api
2017-07-26 16:42:12 -07:00
Aaron Raddon
a53388c7ec
New Format for 2017-07-19 03:21:51+00:00
2017-07-20 18:41:09 -07:00
Aaron Raddon
cab5e508ca
Another date format from salesforce
2017-07-17 14:46:18 -07:00
Aaron Raddon
73f547e7b6
New zone format
2017-07-14 07:02:22 -07:00
Aaron Raddon
b2d4996d99
100% test coverage and simplification
2017-07-13 19:57:15 -07:00
Aaron Raddon
13f5ac295e
Parse format fix
2017-07-13 09:11:41 -07:00
Aaron Raddon
acf14d1efc
Direct return & new format for no second TZ dates
2017-07-12 08:22:34 -07:00
junichif
91bb6b61cd
merge plus/minus state
2017-07-11 13:40:58 -07:00
junichif
47cec0dc4d
parse 2016-06-21T19:55:00+01:00
2017-07-11 11:00:40 -07:00
Aaron Raddon
56e8516666
Further code cleanup and simplification, less len() matches
2017-06-26 17:45:07 -07:00
Aaron Raddon
9904ad7e1b
simplify date parsing
2017-06-25 19:19:36 -07:00
Aaron Raddon
1bef41e8d2
Simplify date parsing, dont need ms etc
2017-06-25 19:12:09 -07:00
Aaron Raddon
f0482b5ca2
Merge branch 'master' of github.com:araddon/dateparse
2017-06-25 19:10:08 -07:00
Aaron Raddon
4d8007b10b
New date formats
2017-06-25 19:09:06 -07:00
junichif
62adefbf6b
parse 2006-01-02 15:04:05 -07:00
2017-06-14 13:56:12 -07:00
junichif
fdd8318abb
parse 2009-08-12T22:15:09.123
2017-05-03 13:50:31 -07:00
Brandon Bennett
a98eb24a4c
remove unnessiary dependencies
2017-04-22 20:57:16 -06:00
junichif
8884440181
update +- timezone parser
2017-04-11 15:39:27 -07:00
junichif
16a3db9352
add more date dot options
2017-04-11 15:32:53 -07:00
Aaron Raddon
5ea40eaf94
Update docs from latest changes
2017-02-14 08:27:25 -08:00
junichif
83d88934e4
split am/pm into own statements
2017-02-13 18:39:03 -08:00
junichif
2ac499f384
fix slash am/pm times
2017-02-13 16:49:48 -08:00