How to parse string dates with a two digit year and split on the right century in C#

added by DotNetKicks
3/9/2019 4:49:17 AM

3 Kicks, 535 Views

So you've been asked to parse some dates, except the years are two digit years. For example, dates like "12 Jun 30" are ambiguous...or are they? If "12 Jun 30" is intended to express a birthday, given it's 2019 as the of writing of this post, we can assume it means 1930.