Python Date format validator
Post first published in nixtip
Simplicity is always best and
Python makes this task insanely easy.
We just only need to take advantage of the
strptime function of the time module.
As usually in
Python, the code is pretty self-explanatory:
If we use the interpreter it couldn’t be more clear.
Choose a good pair of
mask and the result will be fine:
comments powered by