Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Notes - Year need to be on 4 digits, otherwise 24-05-21 is tricky and need to have a setting in the code to select the default format (possible improvement) - Similarily, US format MM-DD-YYYY is super confusing 12-05-2024 is 12th of may or 5th of December ? same as above, regex will need to be set to the required format only - \2 is a backreference that matches the same delimiter captured in the second capturing group (\/|-). This ensures that the delimiter between day and month is consistent DATE_RX = [ cic(ur'(?P<year>(0[1-9]|[12][0-9]|3[01]))[ \-\.\/]?(?P<month>(0[1-9]|1[0-2]))\2?(?P<day>(0[1-9]|[12][0-9]|3[01]))'), #2024-05-21, 2024/25/31, 2024.05.31, 2024 05 31 cic(ur'(?P<day>(0[1-9]|[12][0-9]|3[01]))[ \-\.\/]?(?P<month>(0[1-9]|1[0-2]))\2?(?P<year>(0[1-9]|[12][0-9]|3[01]))?')] #21-05-2024, 21/05/2024, 21.05.2024, 21 05 2024 #482
- Loading branch information