Ejemplo n.º 1
0
  private int compareDates(org.joda.time.LocalDate checkedDate, LocalDate rangeDate) {
    LocalDate localDateUnified =
        LocalDate.of(
            checkedDate.getYear(), checkedDate.getMonthOfYear(), checkedDate.getDayOfMonth());

    if (localDateUnified.isEqual(rangeDate)) {
      return 0;
    }

    return localDateUnified.isAfter(rangeDate) ? 1 : -1;
  }
Ejemplo n.º 2
0
  public List<ExternalTransaction> getTransactions(
      LocalDate dateFrom, LocalDate dateTo, List<Account> accounts, List<Category> categories) {

    String date =
        "2016-" + new DecimalFormat("00").format(1) + "-" + new DecimalFormat("00").format(25);
    ExternalTransaction tr =
        new ExternalTransaction(
            "asdasda", accounts.get(0), (new BigDecimal(232)), org.joda.time.LocalDate.parse(date));
    tr.setCategory(new ArrayList<>(getCategories().get(0).subCategoriesObservableSet()).get(0));
    tr.setId(a++);
    LinkedList<ExternalTransaction> list = new LinkedList<>();
    list.add(tr);

    return list;
  }