¡@

Home 

c# Programming Glossary: datetimeformatinfo

Get the correct week number of a given date

http://stackoverflow.com/questions/11154673/get-the-correct-week-number-of-a-given-date

of the methods that I have tried From the MDSN Library DateTimeFormatInfo dfi DateTimeFormatInfo.CurrentInfo Calendar cal dfi.Calendar.. I have tried From the MDSN Library DateTimeFormatInfo dfi DateTimeFormatInfo.CurrentInfo Calendar cal dfi.Calendar return cal.GetWeekOfYear..

DateTime string parsing

http://stackoverflow.com/questions/1277320/datetime-string-parsing

the TwoDigitYearMax property of the Calendar used by the DateTimeFormatInfo you're using to parse the text. For instance CultureInfo current.. instance CultureInfo current CultureInfo.CurrentCulture DateTimeFormatInfo dtfi DateTimeFormatInfo current.DateTimeFormat.Clone I'm not.. current CultureInfo.CurrentCulture DateTimeFormatInfo dtfi DateTimeFormatInfo current.DateTimeFormat.Clone I'm not sure whether this is necessary..

How to create and use a custom IFormatProvider for DateTime?

http://stackoverflow.com/questions/2382154/how-to-create-and-use-a-custom-iformatprovider-for-datetime

with Reflector shows that the DateTime structure uses the DateTimeFormatInfo.GetInstance method to get the provider to be used for formatting... method to get the provider to be used for formatting. The DateTimeFormatInfo.GetInstance requests a formatter of type DateTimeFormatInfo.. requests a formatter of type DateTimeFormatInfo from the provider passed in never for ICustomFormmater so it..

Get just the hour of day from DateTime using either 12 or 24 hour format as defined by the current culture

http://stackoverflow.com/questions/3015040/get-just-the-hour-of-day-from-datetime-using-either-12-or-24-hour-format-as-defi

ToHourString this DateTime dt IFormatProvider provider DateTimeFormatInfo dtfi DateTimeFormatInfo.GetInstance provider string format Regex.Replace.. dt IFormatProvider provider DateTimeFormatInfo dtfi DateTimeFormatInfo.GetInstance provider string format Regex.Replace dtfi.ShortTimePattern..

How can I get date and time formats based on Culture Info?

http://stackoverflow.com/questions/4353232/how-can-i-get-date-and-time-formats-based-on-culture-info

from the CultureInfo DateTimeFormat property which is a DateTimeFormatInfo instance. This in turn has properties like ShortDatePattern..

Does C# have extension properties? [closed]

http://stackoverflow.com/questions/619033/does-c-sharp-have-extension-properties

I would love it if I could add an extension property to DateTimeFormatInfo called ShortDateLongTimeFormat which returned ShortDatePattern..