当前位置: 首页>>代码示例>>Java>>正文


Java CalendarDate.getMonth方法代码示例

本文整理汇总了Java中net.sf.memoranda.date.CalendarDate.getMonth方法的典型用法代码示例。如果您正苦于以下问题:Java CalendarDate.getMonth方法的具体用法?Java CalendarDate.getMonth怎么用?Java CalendarDate.getMonth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.sf.memoranda.date.CalendarDate的用法示例。


在下文中一共展示了CalendarDate.getMonth方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getNotesForPeriod

import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
public Collection getNotesForPeriod(CalendarDate startDate, CalendarDate endDate) {
    Vector v = new Vector();
    Elements yrs = _root.getChildElements("year");
    for (int yi = 0; yi < yrs.size(); yi++) {
        Year y = new Year(yrs.get(yi));
        if ((y.getValue() >= startDate.getYear()) && (y.getValue() <= endDate.getYear())) {
            Vector months = y.getMonths();
            for (int mi = 0; mi < months.size(); mi++) {
                Month m = (Month) months.get(mi);
                if (!((y.getValue() == startDate.getYear()) && (m.getValue() < startDate.getMonth()))
                    || !((y.getValue() == endDate.getYear()) && (m.getValue() > endDate.getMonth()))) {
                    Vector days = m.getDays();
                    for (int di = 0; di < days.size(); di++) {
                        Day d = (Day) days.get(di);
                        if (!((m.getValue() == startDate.getMonth()) && (d.getValue() < startDate.getDay()))
			|| !((m.getValue() == endDate.getMonth()) && (d.getValue() > endDate.getDay()))) {
				Vector ns = d.getNotes();
				for(int ni = 0; ni < ns.size(); ni++) {
					NoteElement n = (NoteElement) ns.get(ni);
					v.add(new NoteImpl(n.getElement(), _project));
				}
			}
                    }
                }
            }
        }
    }
    return v;
}
 
开发者ID:ser316asu,项目名称:SER316-Munich,代码行数:30,代码来源:NoteListImpl.java

示例2: getMonth

import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
public Element getMonth(CalendarDate date, Element year) {
	Element month = null;
	Elements months = year.getChildElements("month");
	if (months.size() == 0) {
		return null;
	}
	else {
		for (int i = 0; i < months.size(); i++) {
			if (Integer.parseInt(months.get(i).getAttributeValue("month").toString()) == date.getMonth()) {
				month = months.get(i);
				break;
			}
		}
	}
	return month;
}
 
开发者ID:ser316asu,项目名称:SER316-Aachen,代码行数:17,代码来源:DTDEventManager.java

示例3: getNotesForPeriod

import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
public Collection getNotesForPeriod(CalendarDate startDate, CalendarDate endDate) {
    Vector v = new Vector();
    Elements yrs = _root.getChildElements("year");
    for (int yi = 0; yi < yrs.size(); yi++) {
        Year y = new Year(yrs.get(yi));
        if ((y.getValue() >= startDate.getYear()) && (y.getValue() <= endDate.getYear())) {
            Vector months = y.getMonths();
            for (int mi = 0; mi < months.size(); mi++) {
                Month m = (Month) months.get(mi);
                if (!((y.getValue() == startDate.getYear()) && (m.getValue() < startDate.getMonth()))
                    || !((y.getValue() == endDate.getYear()) && (m.getValue() > endDate.getMonth()))) {
                    Vector days = m.getDays();
                    for (int di = 0; di < days.size(); di++) {
                        Day d = (Day) days.get(di);
                        if (!((m.getValue() == startDate.getMonth()) && (d.getValue() < startDate.getDay()))
                        || !((m.getValue() == endDate.getMonth()) && (d.getValue() > endDate.getDay()))) {
                            Vector ns = d.getNotes();
                            for(int ni = 0; ni < ns.size(); ni++) {
                                NoteElement n = (NoteElement) ns.get(ni);
                                v.add(new NoteImpl(n.getElement(), _project));
                            }
                        }
                    }
                }
            }
        }
    }
    return v;
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:30,代码来源:NoteListImpl.java

示例4: getNotesForPeriod

import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
public Collection getNotesForPeriod(CalendarDate startDate, CalendarDate endDate) {
	Vector v = new Vector();
	Elements yrs = _root.getChildElements("year");
	for (int yi = 0; yi < yrs.size(); yi++) {
		Year y = new Year(yrs.get(yi));
		if ((y.getValue() >= startDate.getYear()) && (y.getValue() <= endDate.getYear())) {
			Vector months = y.getMonths();
			for (int mi = 0; mi < months.size(); mi++) {
				Month m = (Month) months.get(mi);
				if (!((y.getValue() == startDate.getYear()) && (m.getValue() < startDate.getMonth()))
						|| !((y.getValue() == endDate.getYear()) && (m.getValue() > endDate.getMonth()))) {
					Vector days = m.getDays();
					for (int di = 0; di < days.size(); di++) {
						Day d = (Day) days.get(di);
						if (!((m.getValue() == startDate.getMonth()) && (d.getValue() < startDate.getDay()))
								|| !((m.getValue() == endDate.getMonth()) && (d.getValue() > endDate.getDay()))) {
							Vector ns = d.getNotes();
							for (int ni = 0; ni < ns.size(); ni++) {
								NoteElement n = (NoteElement) ns.get(ni);
								v.add(new NoteImpl(n.getElement(), _project));
							}
						}
					}
				}
			}
		}
	}
	return v;
}
 
开发者ID:ser316asu,项目名称:Dahlem_SER316,代码行数:30,代码来源:NoteListImpl.java

示例5: yearSpin_actionPerformed

import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
void yearSpin_actionPerformed() {
  if (ignoreChange) return;
  _date = new CalendarDate(_date.getDay(), _date.getMonth(), ((Integer)yearSpin.getValue()).intValue());
  jnCalendar.set(_date);
  notifyListeners();
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:7,代码来源:JNCalendarPanel.java


注:本文中的net.sf.memoranda.date.CalendarDate.getMonth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。