Commit Graph

141 Commits

Author SHA1 Message Date
Klondike Dragon
df9ae2e32a Incorporate support for yyyymmddhhmmss.SSS
Incorporate PR https://github.com/araddon/dateparse/pull/144 from
https://github.com/dferstay to fix
https://github.com/araddon/dateparse/issues/143
2023-12-12 23:19:35 -07:00
Klondike Dragon
fc278d32da Incorporate support for dd-mm-yyyy (digit month)
Incorporate PR https://github.com/araddon/dateparse/pull/140 from
https://github.com/dferstay to fix
https://github.com/araddon/dateparse/issues/139

This also fixes https://github.com/araddon/dateparse/issues/155
(duplicate of issue 139)

PR is adapted to avoid duplicate code and validate format.
2023-12-12 23:07:11 -07:00
Klondike Dragon
18938f16ae Implement support for yyyy mon dd (2013 May 02)
Incorporate PR https://github.com/araddon/dateparse/pull/142 from
https://github.com/dferstay to fix
https://github.com/araddon/dateparse/issues/141
2023-12-12 21:42:48 -07:00
Klondike Dragon
301ffeee02 Add support for mon/dd/yyyy (Oct/31/1970) 2023-12-12 21:24:17 -07:00
Klondike Dragon
49f9259ee3 Add support for dd[th,nd,st,rd] Month yyyy
Incorporate PR https://github.com/araddon/dateparse/pull/128 from
https://github.com/krhubert to fix
https://github.com/araddon/dateparse/issues/127
2023-12-12 20:18:58 -07:00
Klondike Dragon
c62ed15d73 Support PMDT and AMT time zones
Also disallow PM and AM from being specified twice in the string.

Fixes https://github.com/araddon/dateparse/issues/149
2023-12-12 17:42:09 -07:00
Klondike Dragon
3ebc8bc635 Incorporate fix for dd.mm.yyyy format
Incorporates PR https://github.com/araddon/dateparse/pull/133 from https://github.com/mehanizm to fix https://github.com/araddon/dateparse/issues/129

Adds test cases to verify the following are already fixed:
* https://github.com/araddon/dateparse/issues/105
2023-12-11 23:46:44 -07:00
Klondike Dragon
1b1e0b3d33 Add extensive format validation, bugfixes
* Don't just assume we were given one of the valid formats.
* Also consolidate the parsing states that occur after timePeriod.
* Add subtests to make it easier to see what fails.
* Additional tests for 4-char timezone names.
* Fix https://github.com/araddon/dateparse/issues/117
* Fix https://github.com/araddon/dateparse/issues/150
* Fix https://github.com/araddon/dateparse/issues/157
* Fix https://github.com/araddon/dateparse/issues/145
* Fix https://github.com/araddon/dateparse/issues/108
* Fix https://github.com/araddon/dateparse/issues/137
* Fix https://github.com/araddon/dateparse/issues/130
* Fix https://github.com/araddon/dateparse/issues/123
* Fix https://github.com/araddon/dateparse/issues/109
* Fix https://github.com/araddon/dateparse/issues/98
* Addresses bug in https://github.com/araddon/dateparse/issues/100#issuecomment-1118868154

Adds test cases to verify the following are already fixed:
* https://github.com/araddon/dateparse/issues/94
2023-12-11 23:45:58 -07:00
Arran Ubels
01b692d1ce
Another case. 2023-02-16 09:39:34 +11:00
Arran Ubels
8b765a5302
Skip white space 2023-02-15 23:37:23 +11:00
Arran Ubels
19ef6a25eb
New failure - still white space 2023-02-15 17:34:02 +11:00
Arran Ubels
c5a1edc710
My addition last 2023-02-15 16:24:05 +11:00
Arran Ubels
544b5426f4
Test improvements.. I think 2023-02-15 16:20:46 +11:00
Arran Ubels
4345a38e91
Another error 2023-02-15 15:57:15 +11:00
Arran Ubels
2fb4c46691
S1021: should merge variable declaration with assignment on next line (gosimple) 2023-02-15 15:50:42 +11:00
Arran Ubels
26d95ba3e6
My issue 2023-02-15 15:46:27 +11:00
radaiming
5dd51ed0f7 Fix possible panic 2021-04-28 23:23:48 +08:00
Aaron Raddon
0eec95c9db New date format 2020-07-20+00:00 fixes #110 2021-02-06 16:14:29 -08:00
Aaron Raddon
36fa6fb41d fix TZ-location override for format fixes #113 2021-02-06 15:23:24 -08:00
Aaron Raddon
0360d1282f Support len 2 TZ offsets: 2019-05-29T08:41-04 fixes #111 2021-02-06 13:42:06 -08:00
Aaron Raddon
bbfb8e0022 Workfront date format, closes #117 2021-02-05 15:19:04 -08:00
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
ab345927d5 测试完善 2021-02-04 16:11:30 +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
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
asannikov
95c11657d1 Added extra test cases 2020-06-17 23:01:20 +02: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
aca798503a Wrote tests for 100% coverage
Update RetryAmbiguousDateWithSwap detection logic after testing
2019-08-12 20:38:23 -05:00
Philippe Horne
0f77464124 Added a test to cover the 4 year date when dealing with dates of the type 28-Feb-2018. 2019-06-19 15:53:12 -04: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
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