All pastes #248347 Raw Edit

Something

public text v1 · immutable
#248347 ·published 2006-11-14 15:49 UTC
rendered paste body
 public void printCalendar(HttpServletRequest request, HttpServletResponse response) throws IOException,
    SQLException {
        CRSManager c = new CRSManager();
        Date d1 = new Date();
        Date d2;

        d2 = c.getMaxDate(dbcon,"1");

        GregorianCalendar min = new GregorianCalendar();
        GregorianCalendar max = new GregorianCalendar();
        SimpleDateFormat sf = new SimpleDateFormat("MM/dd/yyyy");
        SimpleDateFormat disp = new SimpleDateFormat("EEE MMM,d");
        min.setTime(d1);
        max.setTime(d2);

        PrintWriter out = response.getWriter();
        printTop(request,response);

        out.println("<center><table width=\"800\" border=1><tr></table>");
        out.println(sf.format(min.getTime()));
        out.println(sf.format(max.getTime()));

        while(!min.equals(max)){
            out.println(sf.format(min.getTime()));

            min.add(Calendar.DAY_OF_MONTH,1);
        }

          /*  out.println("</tr><tr>");
            if(min.get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY & min.get(Calendar.DAY_OF_WEEK)!=Calendar.SATURDAY){
                out.println("<td height=\"70\" valign=\"top\"><div align=\"center\"><br>" + disp.format(min.getTime()) + "</td>");

                    }
            out.println(disp.format(d1));

            min.add(Calendar.DAY_OF_MONTH,1);
            }  */
        out.println("</table>");



    }