code: private ProjectCalendarDateRanges getRanges(Date date, Calendar cal, Day day)
     {
        ProjectCalendarDateRanges ranges = getException(date);
        if (ranges == null)
        {
           ProjectCalendarWeek week = getWorkWeek(date);
           if (week == null)
           {
              week = this;
           }
  
           if (day == null)
           {
              if (cal == null)
              {
                 cal = Calendar.getInstance();
                 cal.setTime(date);
              }
              day = Day.getInstance(cal.get(Calendar.DAY_OF_WEEK));
           }
  
           ranges = week.getHours(day);
        }
        return ranges;
     }
docs: Retrieves the working hours on the given date.
  
  @param date required date
  @param cal optional calendar instance
  @param day optional day instance
  @return working hours