views:

562

answers:

2

I'm losing my mind trying to find a table showing all the formats of datetimes for cultures

I've been googling like crazy and all i want is that table! ARG

i.e.

en-CA = DD/MM/YYYY 0.00 en-FR = MM/DD/YYYY 0,00

I'm looking for a link to MSDN or wikipedia - I know I've seen this in the past before

+6  A: 
foreach (var c in System.Globalization.CultureInfo.
                         GetCultures(CultureTypes.AllCultures))
{
  Console.WriteLine("{0} = {1}", c.Name, 
                                 c.DateTimeFormat.FullDateTimePattern);
}
leppie
no, I want a html table I can read off of MSDN - not use programatically
BPAndrew
You can print it!
leppie
there has to be a better option for this - there isnt some sort of page detailing all of this information? I literally have to screw aroudn in my debugger with a watch window to find this out?
BPAndrew
You can also dump it to a file, or insert it into a database, or make a pwetty html file, thats what I did atleast. dump it into a database that is :P
thmsn
CultureInfo has tons of properties, just chose what you need or dump every property to an HTML table or such. Fun late afternoon timewaster :)
leppie
there isnt a msdn page that has this? it bothers me deeply that I had to do this - what a complete waste of time, if its compiled into he framework/OS why isnt there easily accessable documentation for it?
BPAndrew
+1  A: 

If you want a webpage rather than making the information yourself, you can always use the National Language Support API Reference:

Bashkir (Russia)
046D Codepage info
LCID    046D
Locale name Bashkir (Russia)
Language-English name   Bashkir
Language-native name    Башҡорт (Россия)
ANSI codepage   1251
OEM codepage    866
046D NLS formatting
Number formatting
Positive number example 12 346,00
Negative number example -12 346,00
Decimal separator   ,
Digits after decimal separator  2
Digit grouping  3;0;0
Thousands separator [blank][blank]
Negative format symbol  -
Number list separator   ;
Leading and trailing zeros: 0.700 formatted 0,70
Standard digits 0123456789
System of measurements  Metric
...
sixlettervariables
close to what I'm looking for - I dont get why they wont show what the datetime MM DD YYYY codes are for each culture ni that table.. does this infromation change rapidly? I don't understand why this information isnt simply laid out
BPAndrew
Probably because the folks who wrote the documentation didn't forsee needing a table that contained that sort of thing. It is simple enough to lay this information out. Perhaps you could add this table to your blog.
sixlettervariables