Req11: International date literals

[This post is part of a series, "wish-list for future versions of VB"]

 

IDEA: Allow date literals in a subset of ISO8601 format, e.g. #2010-01-26# or #2010-01-26T21:16Z#. (Currently VB only allows the US-specific form #MM/dd/yyyy#). Pretty-listing would leave dates in the format in which they were entered.

SCENARIO: You’re a developer outside the US reading some code. You don’t know if #1/2/2010# means January 2nd or February 1st.

 

Those of us on the VB team who weren’t raised in the US also get confused by VB date literals. We completely understand the wish for a better format.
On the other hand, we believe there aren’t many cases where you would want to hard-code dates into an application. Therefore we think the appeal of this feature would be too small to justify it.

 

Provisional evaluation from VB team: A nice in theory, but it's too rare to be worth changing the language for this. (TimeSpan literals would be more useful, but it's fine just calling the TimeSpan constructor).