Examples of toLocalDate()


Examples of org.joda.time.DateTime.toLocalDate()

        buf = new StringBuilder();
        f.printTo(buf, dt.getMillis());
        assertEquals("Wed 2004-06-09T11:20:30+01:00", buf.toString());
       
        buf = new StringBuilder();
        ISODateTimeFormat.yearMonthDay().printTo(buf, dt.toLocalDate());
        assertEquals("2004-06-09", buf.toString());
       
        buf = new StringBuilder();
        try {
            ISODateTimeFormat.yearMonthDay().printTo(buf, (ReadablePartial) null);
View Full Code Here

Examples of org.joda.time.DateTime.toLocalDate()

            DateTime out = new LocaleBasedJodaTimeConverter(localization).convert(value, shortDate());
            if (out == null) {
                return null;
            }
           
            return out.toLocalDate();
    } catch (Exception e) {
      throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_date"), value));
    }
  }
}
View Full Code Here

Examples of org.joda.time.DateTime.toLocalDate()

                }
                nextday = sessions.get(sessionIdx).day();
               
                days += naturalDaysBetween(prevday, nextday);
                workingDate = dt.plusDays(days);
            } while(calculator.isNonWorkingDay(workingDate.toLocalDate()) &&
                    workingDate.getMonthOfYear() == month);
           
            ++tradingDayCount;
        }
       
View Full Code Here

Examples of org.joda.time.DateTime.toLocalDate()

     * @return            the current date if it is a valid trading date
     *                    or the very next valid trading date.
     */
    public DateTime getSessionTradingDate(DateTime dt) {
        DateTime workingDate = new DateTime(dt);
        while(calculator.isNonWorkingDay(workingDate.toLocalDate()) ||
            !isWorkingDay(workingDate.toLocalDate())) {
            workingDate = workingDate.plusDays(1);
        }
        return workingDate;
    }
View Full Code Here

Examples of org.joda.time.DateTime.toLocalDate()

     *                    or the very next valid trading date.
     */
    public DateTime getSessionTradingDate(DateTime dt) {
        DateTime workingDate = new DateTime(dt);
        while(calculator.isNonWorkingDay(workingDate.toLocalDate()) ||
            !isWorkingDay(workingDate.toLocalDate())) {
            workingDate = workingDate.plusDays(1);
        }
        return workingDate;
    }
   
View Full Code Here

Examples of org.joda.time.DateTime.toLocalDate()

    void doUpdateSize(int size) {
        DateTime end = new DateTime(this.task.getBeginDate()
                .toDayRoundedDate().getTime()).plus(getMapper().toDuration(
                size));
        this.task.resizeTo(end.toLocalDate());
        updateProperties();
    }

    void doAddDependency(String destinyTaskId) {
        getTaskList().addDependency(this,
View Full Code Here

Examples of org.joda.time.DateTime.toLocalDate()

    }

    private EffortDuration getEffortForDetailItem(DetailItem item) {
        DateTime startDate = item.getStartDate();
        DateTime endDate = item.getEndDate();
        return this.aggregate.effortBetween(startDate.toLocalDate(), endDate
                .toLocalDate());
    }

    Component effortOnInterval(DetailItem item) {
        Component result = cannotBeEdited(item) ? new Label()
View Full Code Here

Examples of org.joda.time.DateTime.toLocalDate()

            case VALUE_STRING:
                DateTime local = parseLocal(jp);
                if (local == null) {
                    return null;
                }
                return local.toLocalDate();
            }
            throw ctxt.wrongTokenException(jp, JsonToken.START_ARRAY, "expected JSON Array, String or Number");
        }
    }
View Full Code Here

Examples of org.joda.time.DateTime.toLocalDate()

      DateTime out = new LocaleBasedJodaTimeConverter(localization).convert(value, shortDate());
      if (out == null) {
        return null;
      }
     
      return out.toLocalDate();
    } catch (Exception e) {
      throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_date"), value));
    }
  }
}
View Full Code Here

Examples of org.joda.time.DateTime.toLocalDate()

            case VALUE_STRING:
                DateTime local = parseLocal(jp);
                if (local == null) {
                    return null;
                }
                return local.toLocalDate();
            }
            throw ctxt.wrongTokenException(jp, JsonToken.START_ARRAY, "expected JSON Array, String or Number");
        }
    }
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.