Ejemplo n.º 1
0
  /**
   * Obtain date range from HTTP request.
   *
   * @see Date
   * @param instance Object containing information for this HTTP request
   */
  protected void setDateRange(ThisPage instance) {
    HttpServletRequest req = instance.getRequest();

    /*
     * For the constructor for GregorianCalendar, January is
     * month 0.
     */
    Date start =
        buildDate(
            req.getParameter("START_YEAR"),
            req.getParameter("START_MONTH"),
            req.getParameter("START_DAY"));
    Date end =
        buildDate(
            req.getParameter("END_YEAR"),
            req.getParameter("END_MONTH"),
            req.getParameter("END_DAY"));
    instance.setStartDate(start);
    instance.setEndDate(end);
  }