This method retrieves the calendar hours for the specified day.
Note that if this is a derived calendar, then this method
will refer to the base calendar where no hours are specified
in the derived calendar.

@param day Day instance
@return calendar hours
321055
public ProjectCalendarHours getHours(Day day)
   {
      ProjectCalendarHours result = getCalendarHours(day);
      if (result == null)
      {
         //
         // If this is a base calendar and we have no hours, then we
         // have a problem - so we add the default hours and try again
         //
         if (m_parent == null)
         {
            // Only add default hours for the day that is 'missing' to avoid overwriting real calendar hours
            addDefaultCalendarHours(day);
            result = getCalendarHours(day);
         }
         else
         {
            result = m_parent.getHours(day);
         }
      }
      return result;
   }
893499
public static Calendar calendar(Date date) {
		if(date instanceof DateTime) {
			return ((DateTime)date).toCalendar();
		}else {
			return calendar(date.getTime());
		}
	}
45384
public static Calendar getDateCeil(Date date) {
        Calendar cal = new GregorianCalendar();
        cal.setTime(date);
        return new GregorianCalendar(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH));
    }
1136399
public static final BigInteger printDay(Day day)
   {
      return (day == null ? null : BigInteger.valueOf(day.getValue() - 1));
   }
277825
public Date toDate(Calendar c) {
		c.clear();
		c.set(Calendar.YEAR, year);
		c.set(Calendar.MONTH, month - 1);
		c.set(Calendar.DATE, date);
		c.set(Calendar.HOUR_OF_DAY, hour);
		c.set(Calendar.MINUTE, minute);
		c.set(Calendar.SECOND, second);
		return c.getTime();
	}
447629
public java.util.Map<String, String> getWednesday() {
        if (wednesday == null) {
            wednesday = new com.amazonaws.internal.SdkInternalMap<String, String>();
        }
        return wednesday;
    }
1123998
public com.google.type.TimeOfDayOrBuilder getTimeValueOrBuilder() {
    if (typeCase_ == 6) {
      return (com.google.type.TimeOfDay) type_;
    }
    return com.google.type.TimeOfDay.getDefaultInstance();
  }
756239
public static Date addDays(Date date, int days)
   {
      Calendar cal = popCalendar(date);
      cal.add(Calendar.DAY_OF_YEAR, days);
      Date result = cal.getTime();
      pushCalendar(cal);
      return result;   
   }
956356
public XMLGregorianCalendar newGDay(int day) {
        XMLGregorianCalendar cal=dataFactory.newXMLGregorianCalendar();
        cal.setDay(day);
        return cal;
    }
536100
public static int getHour(Date timeFrom) {
		Calendar instance = Calendar.getInstance();
		instance.setTime(timeFrom);
		int hour = instance.get(Calendar.HOUR);
		return hour;

	}
10526
public static int getWeekdayOfDate(String date) {
		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
		int weekday = 0;
		Calendar c = Calendar.getInstance();
		try {
			c.setTime(formatter.parse(date));
			weekday = c.get(Calendar.DAY_OF_WEEK);
		} catch (ParseException e) {
			e.printStackTrace();
		}
		return weekday;
	}
420616
public Weekday getDayOfWeek() {

        Weekday dow = this.weekday;

        if (dow == null) {
            dow = Weekday.valueOf(GregorianMath.getDayOfWeek(this.year, this.month, this.dayOfMonth));
        }

        return dow;

    }
1178756
public Map<Integer, Hour> getHours(DayOfWeek day) {
    if (hours.get(day) == null) {
      return null;
    }

    return Collections.unmodifiableMap(hours.get(day));
  }
942578
public static Calendar startOfDay(Calendar origin) {
        Calendar cal = (Calendar) origin.clone();
        cal.set(Calendar.MILLISECOND, 0);
        cal.set(Calendar.SECOND, 0);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.HOUR_OF_DAY, 0);
        return cal;
    }
1157830
public static int getCalendarDay(final WeekDay weekday) {
        int calendarDay = -1;
        if (SU.getDay().equals(weekday.getDay())) {
            calendarDay = Calendar.SUNDAY;
        }
        else if (MO.getDay().equals(weekday.getDay())) {
            calendarDay = Calendar.MONDAY;
        }
        else if (TU.getDay().equals(weekday.getDay())) {
            calendarDay = Calendar.TUESDAY;
        }
        else if (WE.getDay().equals(weekday.getDay())) {
            calendarDay = Calendar.WEDNESDAY;
        }
        else if (TH.getDay().equals(weekday.getDay())) {
            calendarDay = Calendar.THURSDAY;
        }
        else if (FR.getDay().equals(weekday.getDay())) {
            calendarDay = Calendar.FRIDAY;
        }
        else if (SA.getDay().equals(weekday.getDay())) {
            calendarDay = Calendar.SATURDAY;
        }
        return calendarDay;
    }
474692
public static int getHour(Date date) {
        Calendar c = Calendar.getInstance();
        c.setTime(date);
        return c.get(Calendar.HOUR_OF_DAY);
    }
934348
public static Date getWeekDay(Date dt, int weekDay) {
        Calendar cal = new GregorianCalendar();
        cal.setTime(dt);
        if (weekDay == 7) {
            weekDay = 1;
        } else {
            weekDay++;
        }
        cal.set(GregorianCalendar.DAY_OF_WEEK, weekDay);
        return cal.getTime();
    }