本文整理了Java中org.activityinfo.model.type.time.LocalDate.atMidnightInMyTimezone()
方法的一些代码示例,展示了LocalDate.atMidnightInMyTimezone()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LocalDate.atMidnightInMyTimezone()
方法的具体详情如下:
包路径:org.activityinfo.model.type.time.LocalDate
类名称:LocalDate
方法名:atMidnightInMyTimezone
暂无
代码示例来源:origin: bedatadriven/activityinfo
public void setDate1(FieldValue value) {
if(value != null) {
this.date1 = ((LocalDate) value).atMidnightInMyTimezone();
}
}
代码示例来源:origin: bedatadriven/activityinfo
public void setDate2(FieldValue value) {
if(value != null) {
this.date2 = ((LocalDate) value).atMidnightInMyTimezone();
}
}
代码示例来源:origin: bedatadriven/activityinfo
public DateRange(org.activityinfo.model.type.time.LocalDate start, org.activityinfo.model.type.time.LocalDate end) {
this.start = start.atMidnightInMyTimezone();
this.end = end.atMidnightInMyTimezone();
}
代码示例来源:origin: bedatadriven/activityinfo
@Override
public Collection<Date> toParameters(FieldValue value) {
LocalDate dateValue = (LocalDate) value;
return singleton(dateValue.atMidnightInMyTimezone());
}
}
代码示例来源:origin: bedatadriven/activityinfo
@Override
public void init(FieldValue value) {
field.setValue(((LocalDate) value).atMidnightInMyTimezone());
}
代码示例来源:origin: bedatadriven/activityinfo
public final Double extractDouble(FieldValue value) {
if (value instanceof Quantity) {
return ((Quantity) value).getValue();
}
if (value instanceof LocalDate) {
return (double) ((LocalDate) value).atMidnightInMyTimezone().getTime();
}
return null;
}
代码示例来源:origin: bedatadriven/activityinfo
public Builder setExpectedPaymentDate(LocalDate date) {
return setExpectedPaymentDate(date.atMidnightInMyTimezone());
}
代码示例来源:origin: bedatadriven/activityinfo
public Builder setExpirationTime(LocalDate date) {
return setExpirationTime(date.atMidnightInMyTimezone());
}
代码示例来源:origin: bedatadriven/activityinfo
@Override
public Date render(int rowIndex) {
assert view != null : "updateColumnSet() has not been called";
String text = view.getString(rowIndex);
if(text == null) {
return null;
}
return LocalDate.parse(text).atMidnightInMyTimezone();
}
代码示例来源:origin: bedatadriven/activityinfo
@Override
public Promise<Void> setValue(LocalDate value) {
dateBox.setValue(value.atMidnightInMyTimezone());
return Promise.done();
}
代码示例来源:origin: bedatadriven/activityinfo
public DayOfWeek getDayOfWeek() {
// Use deprecated Date API because it compiles directly to Javascript builtin.
//noinspection deprecation
return DayOfWeek.values()[atMidnightInMyTimezone().getDay()];
}
代码示例来源:origin: bedatadriven/activityinfo
@Override
public void setValue(Cell cell, int row) {
// Excel does not support date values prior to 1900,
// so we have no choice but to render the value as text if the date occurs
// prior to 1900.
LocalDate localDate = renderer.render(row);
if(localDate.getYear() < 1900) {
cell.setCellValue(localDate.toString());
} else {
cell.setCellValue(localDate.atMidnightInMyTimezone());
}
}
}
代码示例来源:origin: bedatadriven/activityinfo
@Override
public Promise<Void> setValue(LocalDateInterval value) {
startDateBox.setValue(value.getStartDate().atMidnightInMyTimezone());
endDateBox.setValue(value.getEndDate().atMidnightInMyTimezone());
return Promise.done();
}
代码示例来源:origin: bedatadriven/activityinfo
@SuppressWarnings("deprecation")
public static LocalDate fromDayOfYear(int year, int dayOfYear) {
// Use deprecated Date API because it compiles directly to Javascript builtin.
Date jan1 = new LocalDate(year, 1, 1).atMidnightInMyTimezone();
jan1.setDate(dayOfYear);
return new LocalDate(jan1);
}
代码示例来源:origin: bedatadriven/activityinfo
@SuppressWarnings("deprecation")
public LocalDate plusDays(int count) {
// Use deprecated Date API because it compiles directly to Javascript builtin.
Date date = atMidnightInMyTimezone();
date.setDate(date.getDate() + count);
return new LocalDate(date);
}
代码示例来源:origin: bedatadriven/activityinfo
@Override
public void renderTo(FieldValue fieldValue, SafeHtmlBuilder html) {
Month month = (Month) fieldValue;
html.appendEscaped(I18N.MESSAGES.month(month.getFirstDayOfMonth().atMidnightInMyTimezone()));
}
}
代码示例来源:origin: bedatadriven/activityinfo
private FilterConfig dateFilter(FunctionCallNode callNode, LocalDate value) {
FilterConfig config = new FilterConfigBean();
config.setType("date");
config.setComparison(parseDateComparison(callNode));
config.setValue("" + value.atMidnightInMyTimezone().getTime());
return config;
}
代码示例来源:origin: bedatadriven/activityinfo
private String expiringIn(AccountStatus status, int year, int month, int day) {
return status.expiringIn(new LocalDate(year, month, day).atMidnightInMyTimezone());
}
代码示例来源:origin: bedatadriven/activityinfo
@Test
public void dateComparison() {
ColumnFilterParser parser = new ColumnFilterParser(asList(A));
Multimap<Integer, FilterConfig> map = parser.parseFilter(parse("A == DATE(2017, 1, 1)"));
Matcher<FilterConfig> equality = Matchers.allOf(
hasProperty("type", equalTo("date")),
hasProperty("comparison", equalTo("on")),
hasProperty("value", equalTo("" + new LocalDate(2017, 1, 1).atMidnightInMyTimezone().getTime())));
assertThat(map.get(0), contains(equality));
}
代码示例来源:origin: bedatadriven/activityinfo
private void onDatePickerSelected(SelectEvent event) {
FieldInput input = input();
if(input.getState() == FieldInput.State.VALID) {
PeriodValue value = (PeriodValue) input.getValue();
dateMenu.getDatePicker().setValue(value.asInterval().getStartDate().atMidnightInMyTimezone());
} else {
dateMenu.getDatePicker().setValue(new Date());
}
dateMenu.show(pickButton);
}
内容来源于网络,如有侵权,请联系作者删除!