/** * Converts this LocalDate to a DateMidnight in the default time zone. * <p> * As from v1.5, you are recommended to avoid DateMidnight and use * {@link #toDateTimeAtStartOfDay()} instead because of the exception * detailed below. * <p> * This method will throw an exception if the default time zone switches * to Daylight Savings Time at midnight and this LocalDate represents * that switchover date. The problem is that there is no such time as * midnight on the required date, and as such an exception is thrown. * <p> * This instance is immutable and unaffected by this method call. * * @return the DateMidnight instance in the default zone * @deprecated DateMidnight is deprecated */ @Deprecated public DateMidnight toDateMidnight() { return toDateMidnight(null); }
/** * Converts this LocalDate to a DateMidnight in the default time zone. * <p> * As from v1.5, you are recommended to avoid DateMidnight and use * {@link #toDateTimeAtStartOfDay()} instead because of the exception * detailed below. * <p> * This method will throw an exception if the default time zone switches * to Daylight Savings Time at midnight and this LocalDate represents * that switchover date. The problem is that there is no such time as * midnight on the required date, and as such an exception is thrown. * <p> * This instance is immutable and unaffected by this method call. * * @return the DateMidnight instance in the default zone * @deprecated DateMidnight is deprecated */ @Deprecated public DateMidnight toDateMidnight() { return toDateMidnight(null); }
return 12.34; case "bound_date": return new LocalDate(2001, 8, 22).toDateMidnight(DateTimeZone.UTC).getMillis(); case "bound_time": return new LocalTime(3, 4, 5, 321).toDateTime(new DateTime(0, DateTimeZone.UTC)).getMillis();
rr.dateTime = request.date.toDateMidnight(DateTimeZone.forTimeZone(graph.getTimeZone())).getMillis() / 1000 + request.fromTime; rr.walkSpeed = request.walkSpeed;
/** * Converts this LocalDate to a DateMidnight in the default time zone. * <p> * As from v1.5, you are recommended to avoid DateMidnight and use * {@link #toDateTimeAtStartOfDay()} instead because of the exception * detailed below. * <p> * This method will throw an exception if the default time zone switches * to Daylight Savings Time at midnight and this LocalDate represents * that switchover date. The problem is that there is no such time as * midnight on the required date, and as such an exception is thrown. * <p> * This instance is immutable and unaffected by this method call. * * @return the DateMidnight instance in the default zone */ public DateMidnight toDateMidnight() { return toDateMidnight(null); }
return null; return local.toDateMidnight(); default:
@Override public DateMidnight getDate() { DateMidnight dm = this.dateMidnight; if (dm == null) { dm = this.date.toDateMidnight(); this.dateMidnight = dm; } return dm; }
private String mekeQueryString() { return "select left(SERVER, locate(':', SERVER) - 1), NUM_READS, NUM_WRITES, NUM_ABORTS, NUM_CONFLICTS, STATS_WHEN from FF$TRANSACTION_STATISTICS " + "where STATS_WHEN >='" + dateTimeFormatter.print(startOfReport.toDateMidnight()) + "' and STATS_WHEN < '" + dateTimeFormatter.print(endOfReport.toDateMidnight()) + "'"; }
public long adaptToLong(LocalDate date) { if (date != null) { return date.toDateMidnight(mZone).getMillis(); } throw new IllegalArgumentException ("Cannot adapt null date into long for property \"" + mPropertyName + '"'); }
@Override public Timestamp unWrap(final LocalDate value) { if (value==null) { return null; } return new Timestamp(value.toDateMidnight().getMillis()); }
public long adaptToLong(LocalDate date) { if (date != null) { return date.toDateMidnight(mZone).getMillis(); } throw new IllegalArgumentException ("Cannot adapt null date into long for property \"" + mPropertyName + '"'); }
@Override public Timestamp unWrap(final LocalDate value) { if (value==null) { return null; } return new Timestamp(value.toDateMidnight().getMillis()); }
@Override protected boolean isToFire() { int days = Days.daysBetween(calculateStartDate().toDateMidnight(), new LocalDate().toDateMidnight()).getDays(); return days >= INTERVAL; }
@Override protected boolean isToFire() { int days = Days.daysBetween(calculateStartDate().toDateMidnight(), new LocalDate().toDateMidnight()).getDays(); return days >= INTERVAL; }
@Override protected boolean isToFire() { int days = Days.daysBetween(calculateStartDate().toDateMidnight(), new LocalDate().toDateMidnight()).getDays(); return days >= INTERVAL; }
public Object toJdbcType(Object value) { if (value instanceof LocalDate){ return new java.sql.Date(((LocalDate)value).toDateMidnight().getMillis()); } return BasicTypeConverter.toDate(value); }
public Object toJdbcType(Object value) { if (value instanceof LocalDate){ return new java.sql.Date(((LocalDate)value).toDateMidnight().getMillis()); } return BasicTypeConverter.toDate(value); }
public static Interval getInterval(LocalDate startDate, LocalDate endDate) { long start = startDate == null ? Long.MIN_VALUE : startDate.toDateMidnight().getMillis(); long end = endDate == null ? Long.MAX_VALUE : endDate.toDateMidnight().toDateTime().withTime(23, 59, 59, 999).getMillis(); return new Interval(start, end); }
public EventPaymentCode(Person creator, LocalDate startDate, LocalDate endDate, Money minAmount, Money maxAmount) { init(PaymentCodeType.EVENT, startDate.toDateMidnight().toYearMonthDay(), endDate.toDateTimeAtMidnight().toYearMonthDay(), minAmount, maxAmount, creator); }
public DateTime getEndDateBeforeMidnight() { if (getEndDate() == null) { return null; } return getEndDate().plusDays(1).toDateMidnight().toDateTime().minusSeconds(1); } }