public DateTimeFormatter( YearFormat yearFormat, MonthFormat monthFormat, DayFormat dayFormat, DayOfWeekFormat dayOfWeekFormat) { global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.Globalization.DateTimeFormatting.DateTimeFormatter", "DateTimeFormatter.DateTimeFormatter(YearFormat yearFormat, MonthFormat monthFormat, DayFormat dayFormat, DayOfWeekFormat dayOfWeekFormat)"); }
public DateTimeFormatter( YearFormat yearFormat, MonthFormat monthFormat, DayFormat dayFormat, DayOfWeekFormat dayOfWeekFormat, HourFormat hourFormat, MinuteFormat minuteFormat, SecondFormat secondFormat, IEnumerable <string> languages) { global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.Globalization.DateTimeFormatting.DateTimeFormatter", "DateTimeFormatter.DateTimeFormatter(YearFormat yearFormat, MonthFormat monthFormat, DayFormat dayFormat, DayOfWeekFormat dayOfWeekFormat, HourFormat hourFormat, MinuteFormat minuteFormat, SecondFormat secondFormat, IEnumerable<string> languages)"); }
/// <summary> /// /// </summary> /// <param name="Age"></param> /// <param name="format"</param> /// <returns></returns> public int GetBirthYear(int Age, YearFormat format) { int WestYear = (DateTime.Now.Year - Age); if (format == YearFormat.C) { return(WestYear - 1911); } else if (format == YearFormat.W) { return(WestYear); } return(0); }
/// <summary> /// Creates a DateTimeFormatter object that is initialized with year, month, day, and day of week formats. /// </summary> /// <param name="dt"></param> /// <param name="yearFormat">The desired year format to include in the template.</param> /// <param name="monthFormat">The desired month format to include in the template.</param> /// <param name="dayFormat">The desired day format to include in the template.</param> /// <param name="dayOfWeekFormat">The desired day of week format to include in the template.</param> /// <returns></returns> public static string Format(this DateTime dt, YearFormat yearFormat, MonthFormat monthFormat, DayFormat dayFormat, DayOfWeekFormat dayOfWeekFormat) { var formatter = new Windows.Globalization.DateTimeFormatting.DateTimeFormatter(yearFormat, monthFormat, dayFormat, dayOfWeekFormat); return(formatter.Format(dt)); }
public static string Format(this DateTime dt, YearFormat yearFormat, MonthFormat monthFormat, DayFormat dayFormat, DayOfWeekFormat dayOfWeekFormat, HourFormat hourFormat, MinuteFormat minuteFormat, SecondFormat secondFormat, IEnumerable <string> languages, string geographicRegion, string calendar, string clock) { var formatter = new Windows.Globalization.DateTimeFormatting.DateTimeFormatter(yearFormat, monthFormat, dayFormat, dayOfWeekFormat, hourFormat, minuteFormat, secondFormat, languages, geographicRegion, calendar, clock); return(formatter.Format(dt)); }
public string CreateYearTest(int value) { YearFormat year = new YearFormat(value); return(year.ToString()); }