use of com.extjs.gxt.ui.client.util.DateWrapper in project activityinfo by bedatadriven.
the class DateFilterMenu method addLastFourQuarters.
private void addLastFourQuarters() {
DateWrapper today = new DateWrapper();
int year = today.getFullYear();
int quarter = today.getMonth() / 3;
for (int i = 0; i < 4; ++i) {
quarter = quarter - 1;
if (quarter < 0) {
year = year - 1;
quarter = 3;
}
addQuarterRange(year, quarter);
}
}
use of com.extjs.gxt.ui.client.util.DateWrapper in project activityinfo by bedatadriven.
the class MonthlyGrid method formatHeader.
private SafeHtml formatHeader(Month month) {
DateWrapper date = new DateWrapper(month.getYear(), month.getMonth() - 1, 1);
String header = monthFormat.format(date.asDate());
if (locked.apply(month)) {
header = IconImageBundle.ICONS.lockedPeriodSmall().getHTML() + " " + header;
}
return SafeHtmlUtils.fromTrustedString(header);
}
use of com.extjs.gxt.ui.client.util.DateWrapper in project activityinfo by bedatadriven.
the class MonthlyReportsPanel method getInitialStartMonth.
private Month getInitialStartMonth(SiteDTO site) {
String stateKey = "monthlyView" + site.getActivityId() + "startMonth";
if (StateManager.get().getString(stateKey) != null) {
try {
return Month.parseMonth(StateManager.get().getString(stateKey));
} catch (NumberFormatException e) {
}
}
DateWrapper today = new DateWrapper();
return new Month(today.getFullYear(), today.getMonth());
}
Aggregations