List of usage examples for org.joda.time LocalDateTime LocalDateTime
public LocalDateTime(Object instant)
From source file:de.symeda.sormas.api.utils.DateHelper.java
License:Open Source License
public static Date getStartOfMonth(Date date) { return new LocalDateTime(getStartOfDay(date)).withDayOfMonth(1).toDate(); }
From source file:de.symeda.sormas.api.utils.DateHelper.java
License:Open Source License
public static Date getEndOfMonth(Date date) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date);/* w w w .j a va 2 s . c o m*/ return new LocalDateTime(getEndOfDay(date)).withDayOfMonth(calendar.getActualMaximum(Calendar.DAY_OF_MONTH)) .toDate(); }
From source file:de.symeda.sormas.api.utils.DateHelper.java
License:Open Source License
public static Date getStartOfYear(Date date) { return new LocalDateTime(getStartOfDay(date)).withDayOfYear(1).toDate(); }
From source file:de.symeda.sormas.api.utils.DateHelper.java
License:Open Source License
public static Date getEndOfYear(Date date) { Calendar calendar = Calendar.getInstance(); calendar.setTime(getEndOfDay(date)); return new LocalDateTime(calendar.getTime()).withDayOfYear(calendar.getActualMaximum(Calendar.DAY_OF_YEAR)) .toDate();/*from ww w . j a v a 2s. c o m*/ }
From source file:energy.usef.agr.model.SynchronisationConnection.java
License:Apache License
public LocalDateTime getLastSynchronisationTime() { if (lastSynchronisationTime == null) { return null; }//from w w w . j a v a 2 s. com return new LocalDateTime(lastSynchronisationTime); }
From source file:energy.usef.agr.model.SynchronisationConnection.java
License:Apache License
public LocalDateTime getLastModificationTime() { if (lastModificationTime == null) { return null; }// ww w.j a va2 s.c o m return new LocalDateTime(lastModificationTime); }
From source file:energy.usef.agr.workflow.nonudi.dto.CongestionManagementProfileDto.java
License:Apache License
@JsonIgnore public LocalDateTime getIntervalStart() { return new LocalDateTime(new DateTime(this.timeInterval.split("/")[0])); }
From source file:energy.usef.agr.workflow.nonudi.dto.CongestionManagementProfileDto.java
License:Apache License
@JsonIgnore public LocalDateTime getIntervalEnd() { return new LocalDateTime(new DateTime(this.timeInterval.split("/")[1])); }
From source file:energy.usef.dso.model.ConnectionCapacityLimitationPeriod.java
License:Apache License
public LocalDateTime getStartDateTime() { if (startDateTime == null) { return null; }// ww w . j a va2 s .com return new LocalDateTime(startDateTime); }
From source file:energy.usef.dso.model.ConnectionCapacityLimitationPeriod.java
License:Apache License
public LocalDateTime getEndDateTime() { if (endDateTime == null) { return null; }/* w ww. ja v a2 s . c o m*/ return new LocalDateTime(endDateTime); }