Examples of Month


Examples of com.knowgate.misc.Month

  public int loadMeetingsForFellow(JDCConnection oConn, int iDomainId, String sWorkAreaId,
                                   String sFellowId, int iYearMinus1900, int iMonthZeroBased)
    throws SQLException {
 
    oThisMonth = new Month(iYearMinus1900, iMonthZeroBased);
   
    oMeetings = new DBSubset(DB.k_meetings + " m," + DB.k_x_meeting_fellow + " f",
          "m." + DB.gu_meeting + ",m." + DB.dt_start + ",m." + DB.bo_private + ",m." + DB.tx_meeting + ",m." + DB.dt_end,
        "m."+DB.id_domain+"=? AND m."+DB.gu_workarea+"=? AND "+
          "f." + DB.gu_meeting + "=m." + DB.gu_meeting + " AND f." + DB.gu_fellow + "=? AND m." + DB.dt_start + " BETWEEN " + DBBind.escape(firstDay(), "d") + " AND " + DBBind.escape(nextMonth(), "d") + " ORDER BY 2", 60);
View Full Code Here

Examples of com.knowgate.misc.Month

 
  public int loadMeetingsForRoom(JDCConnection oConn, int iDomainId, String sWorkAreaId,
                                 String sRoomNm, int iYearMinus1900, int iMonthZeroBased)
    throws SQLException {
 
    oThisMonth = new Month(iYearMinus1900, iMonthZeroBased);
   
    oMeetings = new DBSubset(DB.k_meetings + " m," + DB.k_x_meeting_room + " f",
          "m." + DB.gu_meeting + ",m." + DB.dt_start + ",m." + DB.bo_private + ",m." + DB.tx_meeting + ",m." + DB.dt_end,
        "m."+DB.id_domain+"=? AND m."+DB.gu_workarea+"=? AND "+
          "f." + DB.gu_meeting + "=m." + DB.gu_meeting + " AND f." + DB.nm_room + "=? AND m." + DB.dt_start + " BETWEEN " + DBBind.escape(firstDay(), "d") + " AND " + DBBind.escape(nextMonth(), "d") + " ORDER BY 2", 60);
View Full Code Here

Examples of com.knowgate.misc.Month

  public int loadMeetingsForAddress(JDCConnection oConn, int iDomainId, String sWorkAreaId,
                                    String sAddrId, int iYearMinus1900, int iMonthZeroBased)
    throws SQLException {
 
    oThisMonth = new Month(iYearMinus1900, iMonthZeroBased);
   
    oMeetings = new DBSubset(DB.k_meetings + " m",
          "m." + DB.gu_meeting + ",m." + DB.dt_start + ",m." + DB.bo_private + ",m." + DB.tx_meeting + ",m." + DB.dt_end,
        "m."+DB.id_domain+"=? AND m."+DB.gu_workarea+"=? AND "+
          "m." + DB.gu_address + "=? AND m." + DB.dt_start + " BETWEEN " + DBBind.escape(firstDay(), "d") + " AND " + DBBind.escape(nextMonth(), "d") + " ORDER BY 2", 60);
View Full Code Here

Examples of com.knowgate.misc.Month

    ArrayList<Month> aMonthsWithPosts = Forums.getMonthsWithPosts(oConn, sGuNewsGrp);
    StringBuffer oStrBuff = new StringBuffer();
    oStrBuff.append("<Months>");
    if (null!=aMonthsWithPosts) {
      for (int n=aMonthsWithPosts.size()-1; n>=0; n--) {
        Month m = aMonthsWithPosts.get(n);
        oStrBuff.append("<Month m=\""+Gadgets.leftPad(String.valueOf(m.getMonth()+1),'0',2)+"\" y=\""+String.valueOf(m.getYear()+1900)+"\">");
        oStrBuff.append(com.knowgate.misc.Calendar.MonthName(m.getMonth(), sLanguage)+" "+String.valueOf(m.getYear()+1900));
        oStrBuff.append("</Month>");
      } // next
    } // fi
    oStrBuff.append("</Months>");
    return oStrBuff.toString();
View Full Code Here

Examples of com.knowgate.misc.Month

      oRSet.close();
      if (bMonthHasPosts) {
          if (DebugFile.trace) {
            DebugFile.writeln(com.knowgate.misc.Calendar.MonthName(dtFirstDayOfMonth.getMonth(),"en")+" "+String.valueOf(dtFirstDayOfMonth.getYear()+1900)+" has posts");
          }
      aMonthsWithPosts.add(new Month(dtFirstDayOfMonth.getYear(),dtFirstDayOfMonth.getMonth()));
      } else {
          if (DebugFile.trace) {
            DebugFile.writeln(com.knowgate.misc.Calendar.MonthName(dtFirstDayOfMonth.getMonth(),"en")+" "+String.valueOf(dtFirstDayOfMonth.getYear()+1900)+" has not posts");
          }
      } // fi
View Full Code Here

Examples of com.positive.charts.data.time.Month

    case (DateTickUnit.MONTH):
      years = calendar.get(Calendar.YEAR);
      calendar.clear(Calendar.MILLISECOND);
      calendar.set(years, value, 1, 0, 0, 0);
      Month month = new Month(calendar.getTime());
      Date standardDate = this.calculateDateForPosition(month,
          this.tickMarkPosition);
      final long millis = standardDate.getTime();
      if (millis > date.getTime()) {
        month = (Month) month.previous();
        standardDate = this.calculateDateForPosition(month,
            this.tickMarkPosition);
      }
      return standardDate;
View Full Code Here

Examples of com.projectplace.gwt.reltime.client.units.Month

        timeUnits.add(new Second());
        timeUnits.add(new Minute());
        timeUnits.add(new Hour());
        timeUnits.add(new Day());
        timeUnits.add(new Week());
        timeUnits.add(new Month());
        timeUnits.add(new Year());
        timeUnits.add(new Decade());
        timeUnits.add(new Century());
        timeUnits.add(new Millennium());
    }
View Full Code Here

Examples of com.tapestry5book.tlog.core.entities.Month

        for (Object next : result) {
            Object[] array = (Object[]) next;

            final Number count = (Number) array[0];

            Month month = new Month((Integer) array[1], (Integer) array[2]);

            archives.add(new Archive(month, count));
        }

        return archives;
View Full Code Here

Examples of java.time.Month

        LocalDateTime sylvester = LocalDateTime.of(2014, Month.DECEMBER, 31, 23, 59, 59);

        DayOfWeek dayOfWeek = sylvester.getDayOfWeek();
        System.out.println(dayOfWeek);      // WEDNESDAY

        Month month = sylvester.getMonth();
        System.out.println(month);          // DECEMBER

        long minuteOfDay = sylvester.getLong(ChronoField.MINUTE_OF_DAY);
        System.out.println(minuteOfDay);    // 1439
View Full Code Here

Examples of net.sourceforge.pebble.domain.Month

   */
  public int doStartTag() throws JspException {

    HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
    Blog blog = (Blog)request.getAttribute(Constants.BLOG_KEY);
    Month month = (Month)request.getAttribute(Constants.MONTHLY_BLOG);
    Day today = blog.getBlogForToday();
    Calendar now = blog.getCalendar();

    if (month == null) {
      month = today.getMonth();
    }

    Calendar firstDayOfMonth = blog.getCalendar();
    firstDayOfMonth.setTime(month.getBlogForDay(1).getDate());

    SimpleDateFormat monthAndYearFormatter = new SimpleDateFormat("MMMM yyyy", blog.getLocale());
    monthAndYearFormatter.setTimeZone(blog.getTimeZone());
    SimpleDateFormat monthFormatter = new SimpleDateFormat("MMM", blog.getLocale());
    monthFormatter.setTimeZone(blog.getTimeZone());
    NumberFormat numberFormatter = NumberFormat.getIntegerInstance(blog.getLocale());

    Month firstMonth = blog.getBlogForFirstMonth();

    try {
      JspWriter out = pageContext.getOut();

      out.write("<div class=\"calendar\">");
      out.write("<table width=\"100%\">");
      out.write("<tr>");
      out.write("<td colspan=\"7\" align=\"center\">");
      if (month.before(firstMonth)) {
        out.write("<b>");
        out.write(monthAndYearFormatter.format(month.getDate()));
        out.write("</b>");
      } else {
        out.write("<b><a href=\"");
        out.write(UrlRewriter.doRewrite(month.getPermalink()));
        out.write("\">");
        out.write(monthAndYearFormatter.format(month.getDate()));
        out.write("</a></b>");
      }
      out.write("</td>");
      out.write("</tr>");

      int firstDayOfWeek = now.getFirstDayOfWeek();

      // write out the calendar header
      DateFormatSymbols symbols = new DateFormatSymbols(blog.getLocale());
      String[] days = symbols.getShortWeekdays();
      out.write("<tr>");
      for (int i = firstDayOfWeek; i <= 7; i++) {
        out.write("<td class=\"calendarDayHeader\" width=\"14%\">" + days[i] + "</td>");
      }
      for (int i = 1; i < firstDayOfWeek; i++) {
        out.write("<td class=\"calendarDayHeader\">" + days[i] + "</td>");
      }
      out.write("</tr>");

      // write out the body of the calendar
      Iterator it = getDatesForCompleteWeeks(blog, month).iterator();
      Calendar cal;
      int count = 0;
      while (it.hasNext()) {
        cal = (Calendar)it.next();
        Day daily = blog.getBlogForDay(cal.getTime());

        String formattedNumber = numberFormatter.format(cal.get(Calendar.DAY_OF_MONTH));
        if (formattedNumber.length() == 1) {
          formattedNumber = "&nbsp;" + formattedNumber;
        }

        if (count % 7 == 0) {
          out.write("<tr>");
        }

        // output padding if the date to display isn't in the month
        if (cal.get(Calendar.MONTH) != firstDayOfMonth.get(Calendar.MONTH)) {
          out.write("<td class=\"calendarDay\">&nbsp;");
        } else if (now.get(Calendar.YEAR) == cal.get(Calendar.YEAR) &&
          now.get(Calendar.MONTH) == cal.get(Calendar.MONTH) &&
          now.get(Calendar.DAY_OF_MONTH) == cal.get(Calendar.DAY_OF_MONTH)) {
          out.write("<td class=\"calendarToday\">");
          if (daily.hasBlogEntries()) {
            out.write("&nbsp;<a href=\"" + UrlRewriter.doRewrite(daily.getPermalink()) + "\">" + formattedNumber + "</a>&nbsp;");
          } else {
            out.write("&nbsp;" + formattedNumber + "&nbsp;");
          }
        } else {
          if (daily.hasBlogEntries()) {
            out.write("<td class=\"calendarDayWithEntries\">");
            out.write("&nbsp;<a href=\"" + UrlRewriter.doRewrite(daily.getPermalink()) + "\">" + formattedNumber + "</a>&nbsp;");
          } else {
            out.write("<td class=\"calendarDay\">");
            out.write("&nbsp;" + formattedNumber + "&nbsp;");
          }
        }
        out.write("</td>");

        if (count % 7 == 6) {
          out.write("</tr>");
        }

        count++;
      }

      // write out the footer of the calendar
      Month previous = month.getPreviousMonth();
      Month next = month.getNextMonth();

      out.write("<tr>");
      out.write("<td colspan=\"7\" align=\"center\">");

      // only display the previous month link if there are blog entries
      if (previous.before(firstMonth)) {
        out.write(monthFormatter.format(previous.getDate()));
      } else {
        out.write("<a href=\"" + UrlRewriter.doRewrite(previous.getPermalink()) + "\">" + monthFormatter.format(previous.getDate()) + "</a>");
      }

      String todayText = I18n.getMessage(blog, "common.today");
      out.write("&nbsp; | &nbsp;");
      out.write("<a href=\"" + UrlRewriter.doRewrite(today.getPermalink()) + "\">" + todayText + "</a>");
      out.write("&nbsp; | &nbsp;");

      // only display the next month date if it's not in the future
      if (next.getDate().after(now.getTime()) || next.before(firstMonth)) {
        out.write(monthFormatter.format(next.getDate()));
      } else {
        out.write("<a href=\"" + UrlRewriter.doRewrite(next.getPermalink()) + "\">" + monthFormatter.format(next.getDate()) + "</a>");
      }
      out.write("</td>");
      out.write("</tr>");

      out.write("</table>");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.