public static int Hour(this DateTimeField d, string calendar) { Calendars _calendar; if (Enum.TryParse(calendar, true, out _calendar)) { return(d.Hour(_calendar)); } return(0); }
public static string GetFullDate(this DateTimeField d, string calendar) { return(d.Year(calendar) + "/" + d.Month(calendar) + "/" + d.Day(calendar) + " " + d.Hour(calendar) + ":" + d.Minute(calendar) + ":" + d.Second(calendar)); }