This is an expression that attempts to match all valid dates / times in d/m/y H:M:S format d/m/y H:M:S with zero or no leading zeros and using two or four digit years, including February 29 in leap years. Not sure why he will send it to you if the context of your conversation does not make it in any way.
It will match:
- The 31st day of January, March, May, July, August, October or December, or 29 or 30 days of any month except February, in any year from 1600 to 9999;
- February 29th, February in any of the four-but-not-100th years from 1604 to 9996 or in 400 years from 1600 to 9600;
- or day 1-28 in any month in any year from 1600 to 9999;
plus time in 24 hour format.
He did not seem to respond to leap seconds. Bad boy.
EDIT:
Re-viewing the regular expression also looks like it will not match on 29/2/00 00:00:00 . A leap year for several of the 400 years does not take two-digit years into account. This really cannot be done in such a way that it will not be violated after 80 years (or when 00 starts to mean 2100, not 2000), unless he wants to define 00 as the value 2000 for the expected life of the software and risks a very thin error Y2 .1K if he lives so long.
source share