本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}