R
Ross Presser
Could you give an example where you'd *want* the specified format to
give different results in different cultures?
The only one I can think of involves a different calendar, as I said.
For instance, in the Hebrew calendar, there are frequently leap months (7
out of every 19 years), so
DateTime dt = DateTime.ParseExact(
"13075765","MMddyyyy", new CultureInfo("he-IL"))
might *not* return an error, but
DateTime dt = DateTime.ParseExact(
"13072005","MMddyyyy", CultureInfo.InvariantCulture)
definitely should. Likewise, a
I don't know if this is actually the case, however. I know the .net
framework does have support for other calendars (see
CultureInfo.OptionalCalendars), but I don't know if it extends to
ParseExact, nor how it would work there.