code: public Duration getWork(Date date, TimeUnit format)
     {
        ProjectCalendarDateRanges ranges = getRanges(date, null, null);
        long time = getTotalTime(ranges);
        return convertFormat(time, format);
     }
docs: Retrieves the amount of work on a given day, and
  returns it in the specified format.
  
  @param date target date
  @param format required format
  @return work duration