What is difference between MonthGenitiveNames and MonthNames? Why there is blank as month?

StackOverflow https://stackoverflow.com/questions/19675155

  •  01-07-2022
  •  | 
  •  

Pregunta

I'm confused about MonthGenitiveNames and MonthNames. There are month names as values of both, so what is the difference between MonthGenitiveNames and MonthNames.

Also why is there "blank" for a month? If you look at values of both, there are blank values. What is the reason for the blank in Month names?

¿Fue útil?

Solución

Genitive names exist because some languages use a different case of nouns to express dates (genitive instead of nominative).

E.g. in Polish nominative for January is "styczeń" but to express a date 2 January you need to use genitive "2 stycznia".

Otros consejos

Michael Kaplan has written a bunch about genetive (see http://www.siao2.com/2010/09/09/10059644.aspx and http://www.siao2.com/2012/01/05/10253370.aspx) so I won't rehash that. In short MonthNames are used in contexts where there is no day and GenitiveMonthNames are used in contexts where there is a day. The actual case may or may not be Genitive (it is so named because the first cases where this was important to distinguish did have a genitive case distinction).

In addition to being used for the Gregorian calendar, the MonthNames and GenitiveMonthNames properties are used for calendars other than Gregorian. When such a calendar system has 13 months, there will not be a blank for the 13th month. It will always be blank for Gregorian since there is no 13th month in the Gregorian system.

Link : http://msdn.microsoft.com/en-us/library/system.globalization.datetimeformatinfo.monthgenitivenames.aspx:

For example, a date in the Russian (Russia), "ru-RU", culture, consists of the day number and the genitive month name.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top