tomasbedrich / pycaching

A Python 3 interface for working with Geocaching.com website.
https://pycaching.readthedocs.io/
GNU Lesser General Public License v3.0
61 stars 46 forks source link

Problems with date parsing #202

Open BelKed opened 1 year ago

BelKed commented 1 year ago

As I recently realised, there are many date formats supported by Geocaching. Although, some of them are not parsed correctly. The problem is about exchanging days and months. (By the way, this problem was there before my PR #201)

Example: (All dates should be 2022-01-09)

9. 01. 2023      2023-01-09
9.1.2023         2023-01-09
9.1.2023 г.      2023-01-09
9/1/2023         2023-09-01
9/01/2023        2023-09-01
09 Jan 23        2023-01-09
09.01.23         2023-01-09
09.01.2023       2023-01-09
09.Jan.2023      2023-01-09
09/01/2023       2023-09-01
09/Jan/2023      2023-01-09
09-01-23         2023-01-09
09-01-2023       2023-01-09
9-1-2023         2023-01-09
1/9/2023         2023-01-09
01/09/2023       2023-01-09
Jan/09/2023      2023-01-09
2023. 1. 9.      2023-01-09
2023. 01. 09.    2023-01-09
2023/01/09       2023-01-09
2023-01-09       2023-01-09

I can't think of a simple solution because 09/01/2023 and 01/09/2023, 9/1/2023 and 1/9/2023...

BelKed commented 1 year ago

Or maybe it wouldn't be that hard?

(Every) Geocaching page contains something like this:

 Githubissues.
            
  • Githubissues is a development platform for aggregating issues.