My credit card processor requires I send a two-digit year from the credit card expiration date. Here is how I a currently processing:
I put a DropDownList of the 4-digit year on the page.
I validate the expiration date in a DateTime field to be sure that the expiration date being passed to the CC processor isn't expired.
I send a two-d...
Is there a preferred algorithm for converting a 2-digit year into a 4-digit year?
I have a 2-digit birth date (along with month and day) that I want to convert to a C# DateTime. Obiviously, birthdates cannot be in the future, but is there an existing facility in .NET to convert a 2-digit year into a four-digit year?
...
Microsoft's DateTimePicker common control shows ShortDate's according to the configured Locale settings. The customer's computer is configured with a 2-digit year ShortDateFormat (d/M/yy), so the DateTimePicker shows 2-digit years:
When the user puts focus in the year block of the datetime picker, Microsoft points out the issue, and s...
Consider the following birthdays (as dob):
1-Jun-68
1-Jun-69
When parsed with Python’s datetime.strptime(dob, '%d-%b-%y') will yield:
datetime.datetime(2068, 6, 1, 0, 0)
datetime.datetime(1969, 6, 1, 0, 0)
Well of course they’re supposed to be born in the same decade but now it’s not even in the same century!
According to the do...