Package org.joda.time

Examples of org.joda.time.LocalDate.toDate()


     
    int daysDiff1 = Days.daysBetween(beforeFlightDate, currentTime).getDays();
    int daysDiff3 = Days.daysBetween(currentTime, afterFlightDate).getDays();
   
    String beforeDateFormatted = YYYYMMDD_FORMATTER.format(beforeFlightDate.toDate());
    String afterDateFormatted = YYYYMMDD_FORMATTER.format(afterFlightDate.toDate());
   
    LOG.debug("Today (Current UTC Time) - {}", YYYYMMDD_FORMATTER.format(currentUTCTime));
    LOG.debug("1 month before departure - {}, {}", beforeFlightDate, daysDiff1);
    LOG.debug("1 month after departure - {}, {}", afterFlightDate, daysDiff3);
   
View Full Code Here


    private DateTimeFormatter fmt = ISODateTimeFormat.date();
   
    @Override
    public byte[] convertToNoSqlImpl(Object value) {
      LocalDate dt = (LocalDate) value;
      long milliseconds = dt.toDate().getTime();
      return StandardConverters.convertToBytes(milliseconds);
    }

    @Override
    public Object convertFromNoSqlImpl(byte[] value) {
View Full Code Here

            final LocalDate newValue = command.localDateValueOfParameterNamed(fromDateParamName);
            final String newValueAsString = command.stringValueOfParameterNamed(fromDateParamName);
            actualChanges.put(fromDateParamName, newValueAsString);
            actualChanges.put(localeParamName, localeAsInput);
            actualChanges.put(dateFormatParamName, dateFormat);
            this.fromDate = newValue.toDate();
        }

        if (command.isChangeInLocalDateParameterNamed(endDateParamName, getEndDateAsLocalDate())) {
            final LocalDate newValue = command.localDateValueOfParameterNamed(endDateParamName);
            final String newValueAsString = command.stringValueOfParameterNamed(endDateParamName);
View Full Code Here

            final LocalDate newValue = command.localDateValueOfParameterNamed(endDateParamName);
            final String newValueAsString = command.stringValueOfParameterNamed(endDateParamName);
            actualChanges.put(endDateParamName, newValueAsString);
            actualChanges.put(localeParamName, localeAsInput);
            actualChanges.put(dateFormatParamName, dateFormat);
            this.endDate = newValue.toDate();
        }

        if (isFromDateAfterToDate()) {
            baseDataValidator.parameter(fromDateParamName).value(fromDate).failWithCode("from.date.is.after.to.date");
        }
View Full Code Here

    private DateTimeFormatter fmt = ISODateTimeFormat.date();
   
    @Override
    public byte[] convertToNoSqlImpl(Object value) {
      LocalDate dt = (LocalDate) value;
      long milliseconds = dt.toDate().getTime();
      return StandardConverters.convertToBytes(milliseconds);
    }

    @Override
    public Object convertFromNoSqlImpl(byte[] value) {
View Full Code Here

                setCellValueForDate(cell, date, dateCellStyle);
                return;
            }
            if(valueAsObj instanceof LocalDateTime) {
                LocalDateTime value = (LocalDateTime) valueAsObj;
                Date date = value.toDate();
                setCellValueForDate(cell, date, dateCellStyle);
                return;
            }
            if(valueAsObj instanceof DateTime) {
                DateTime value = (DateTime) valueAsObj;
View Full Code Here

                setCellValueForDate(cell, date, dateCellStyle);
                return;
            }
            if(valueAsObj instanceof DateTime) {
                DateTime value = (DateTime) valueAsObj;
                Date date = value.toDate();
                setCellValueForDate(cell, date, dateCellStyle);
                return;
            }
           
            // number
View Full Code Here

    @Override
    void apachePOI(POICell cell, Object value) {
      if (value != null) {
        LocalDate val = (LocalDate) value;
        cell.setCellType(Cell.CELL_TYPE_NUMERIC);
        cell.setCellValue(val.toDate());
      }
    }

  }
View Full Code Here

    private DateTimeFormatter fmt = ISODateTimeFormat.date();
   
    @Override
    public byte[] convertToNoSqlImpl(Object value) {
      LocalDate dt = (LocalDate) value;
      long milliseconds = dt.toDate().getTime();
      return StandardConverters.convertToBytes(milliseconds);
    }

    @Override
    public Object convertFromNoSqlImpl(byte[] value) {
View Full Code Here

            actualChanges.put(dateFormatParamName, dateFormatAsInput);
            actualChanges.put(localeParamName, localeAsInput);

            final LocalDate newValue = command.localDateValueOfParameterNamed(startDateParamName);
            if (newValue != null) {
                this.startDate = newValue.toDate();
            } else {
                this.startDate = null;
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.