public string BookingStartStopTime() { int s = FSManager.GetDateFromSeconds(StartTime).Hour; int e = FSManager.GetDateFromSeconds(EndTime).Hour; string startHourStr = s + " AM"; string endHourStr = e + " AM"; if (s > 11) { startHourStr = s + " PM"; if (s > 12) { startHourStr = (s - 12) + " PM"; } } if (e > 11) { endHourStr = e + " PM"; if (e > 12) { endHourStr = (e - 12) + " PM"; } } return(startHourStr + " - " + endHourStr);; }
public string BookingDay() { string output = ""; long tdy = FSManager.GetSeconds(DateTime.Now); if (FSManager.CheckDateWithinWeek(tdy, StartTime)) { int today = FSManager.GetDayOfWeek(DateTime.Now); int b = FSManager.GetDayOfWeek(FSManager.GetDateFromSeconds(StartTime)); if (today == b) { output = "TODAY"; } else if (b == (today + 1)) { output = "TOMORROW"; } else { output = FSManager.GetDateFromSeconds(StartTime).DayOfWeek.ToString(); } } else { // Just post date DateTime dt = FSManager.GetDateFromSeconds(StartTime); output = dt.Month + "-" + dt.Day; } return(output); }
public string BookingDescription() { DateTime dtStart = FSManager.GetDateFromSeconds(StartTime); DateTime dtEnd = FSManager.GetDateFromSeconds(EndTime); string startHour = dtStart.ToString("hh:mm tt"); string endHour = dtEnd.ToString("hh:mm tt"); string s = "Name: " + Name + Environment.NewLine + "Sim: " + SimName + Environment.NewLine + "Run Time: " + startHour + " - " + endHour; Console.WriteLine("Desc: " + s + Environment.NewLine + "Start: " + dtStart.TimeOfDay + " End: " + dtEnd.TimeOfDay); return(s); }
public int[] GetTodaysHours(DateTime dt) { return(Hours[FSManager.GetDayOfWeek(dt)]); }
public DateTime GetBookingDate() { return(FSManager.GetDateFromSeconds(StartTime)); }
public int GetEndHour(DateTime dt) { return(FSManager.GetHour(EndTime, dt)); }
public int GetStartHour(DateTime dt) { return(FSManager.GetHour(StartTime, dt)); }
public string GetCompiledStartTime() { DateTime dt = FSManager.GetDateFromSeconds(StartTime); return(dt.Hour + ":" + dt.Minute + ":00"); }