Skip to main content
edited tags
Link
Drew
  • 79.1k
  • 10
  • 123
  • 257
edited tags
Link
Tobias
  • 33.7k
  • 1
  • 38
  • 78
Source Link
tmalsburg
  • 2.6k
  • 1
  • 17
  • 30

Check whether a string is a date in a specific format, e.g. "%Y-%m-%d"

I have a string and would like to check whether it contains a date in a given date format, e.g. "%Y-%m-%d", with format as for format-time-string. This is for a package and users can configure the date format freely. So I cannot just hard-code a regular expression.