News for hackers. Stuff that matters.
Re:Microfeatures I'd like to see in more languages by int_19h on Friday January 06, 2023 @02:10AM (#34271841)
A VB date literal is and always has been locale-independent. Originally, they did make the mistake of making it always US-style, M/D/Y. VB.NET added more sane formats such as YYYY-MM-DD.

Now if you tried to convert a Date value to String at runtime, yeah, that would use the current locale. That was a constant source of bugs in VB6 apps running on non-US locales (including, famously, at least one Microsoft installer).

Re:Microfeatures I'd like to see in more languages by jameshart on Friday January 06, 2023 @09:35AM (#34275006)
Are you sure? Maybe for Visual Basic proper, but I thought the VBA date literal basically followed Excel date parsing rules, so was localized depending on your office inatall.
Re:Microfeatures I'd like to see in more languages by jameshart on Friday January 06, 2023 @09:42AM (#34275096)
Apparently I'm misremembering: https://www.engram9.info/excel-2007-vba-2/date-literals.html

Still, this violates the principle of least surprise for non-american developers, at least, so seems pretty on brand for VB.