Examples of minusWeeks()


Examples of org.joda.time.DateMidnight.minusWeeks()

        return thisMonday == null ? null : new Interval(thisMonday, thisMonday.plusWeeks(1));
    }

    public Interval getPreviousWeek() {
        final DateMidnight thisMonday = getThisMonday();
        return thisMonday == null ? null : new Interval(thisMonday.minusWeeks(1), thisMonday);
    }

    public boolean isAfter(ExecutionSemester executionSemester) {
        return this.compareTo(executionSemester) > 0;
    }
View Full Code Here

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

      case TODAY:
        return dt.minusHours(24).getMillis();
      case YESTERDAY:
        return dt.minusHours(48).getMillis();
      case THISWEEK:
        return dt.minusWeeks(1).getMillis();
      case LASTWEEK:
        return dt.minusWeeks(2).getMillis();
      case THISMONTH:
        return dt.minusMonths(1).getMillis();
      case LASTMONTH:
View Full Code Here

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

      case YESTERDAY:
        return dt.minusHours(48).getMillis();
      case THISWEEK:
        return dt.minusWeeks(1).getMillis();
      case LASTWEEK:
        return dt.minusWeeks(2).getMillis();
      case THISMONTH:
        return dt.minusMonths(1).getMillis();
      case LASTMONTH:
        return dt.minusMonths(2).getMillis();
      case THISYEAR:
View Full Code Here

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

      case YESTERDAY:
        return dt.minusHours(24).getMillis();
      case THISWEEK:
        return dt.getMillis();
      case LASTWEEK:
        return dt.minusWeeks(1).getMillis();
      case THISMONTH:
        return dt.getMillis();
      case LASTMONTH:
        return dt.minusMonths(1).getMillis();
      case THISYEAR:
View Full Code Here

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

                          1,
                          1,
                          0,
                          0).withWeekOfWeekyear(this.week);
     
      firstDateOfWeek = firstDateOfWeek.minusWeeks(PeriodSelector.this.numberOfPeriods);
     
      return firstDateOfWeek;
    }
    public DateTime getUpperBound(){
      DateTime lastDateOfWeek = new DateTime(year,
View Full Code Here

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

        new Period("P1M")
    );

    Assert.assertTrue(
        rule.appliesTo(
            builder.interval(new Interval(now.minusWeeks(1), now.minusDays(1)))
                       .build(),
            now
        )
    );
    Assert.assertTrue(
View Full Code Here

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

        null,
        0,
        ""
    );

    Assert.assertTrue(rule.appliesTo(builder.interval(new Interval(now.minusWeeks(1), now)).build(), now));
    Assert.assertTrue(
        rule.appliesTo(
            builder.interval(new Interval(now.minusDays(1), now.plusDays(1)))
                   .build(),
            now
View Full Code Here

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

        // ensure there is at least one digit, and exactly one character suffix, and the suffix is a legal option
        if (!ctime.matches("^[0-9]+[yMwdhms]$")) throw new IllegalArgumentException("Invalid option for ctime: "+ctime);

        if (ctime.endsWith("y")) return dateTime.minusYears(getCtimeNumber(ctime)).getMillis();
        if (ctime.endsWith("M")) return dateTime.minusMonths(getCtimeNumber(ctime)).getMillis();
        if (ctime.endsWith("w")) return dateTime.minusWeeks(getCtimeNumber(ctime)).getMillis();
        if (ctime.endsWith("d")) return dateTime.minusDays(getCtimeNumber(ctime)).getMillis();
        if (ctime.endsWith("h")) return dateTime.minusHours(getCtimeNumber(ctime)).getMillis();
        if (ctime.endsWith("m")) return dateTime.minusMinutes(getCtimeNumber(ctime)).getMillis();
        if (ctime.endsWith("s")) return dateTime.minusSeconds(getCtimeNumber(ctime)).getMillis();
        throw new IllegalArgumentException("Invalid option for ctime: "+ctime);
View Full Code Here

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

        for (int i = 0; i < 4; i++) {
            Nicolive nicolive = new Nicolive();
            nicolive.setKey(Datastore.allocateId(NicoliveMeta.get()));
            nicolive.setTitle("テスト" + i);
            nicolive.setDescription(new Text("テスト説明文" + i));
            nicolive.setOpenTime(datetime.minusWeeks(i).toDate());
            nicolive.setLink(new Link("http://ryu22e.org/" + i));
            nicolives.add(nicolive);

            NicoliveIndex index1 = new NicoliveIndex();
            index1.setKeyword("テスト");
View Full Code Here

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

        // today notification
        final List<Notification> todayNotifications = filterByDate(DateUtil.getTodayStartDate(), DateUtil.getNextDayMidnightDate());
        // this week (minus today)
        DateTime thisWeek = new DateTime(DateUtil.getTodayStartDate());
        thisWeek = thisWeek.minusMinutes(1);
        Date finalThisWeek = thisWeek.minusWeeks(1).toDate();
        final List<Notification> thisWeekList = filterByDate(finalThisWeek, thisWeek.toDate());
        // this months notifications
        final DateTime finalThisWeekMinusOne = new DateTime(finalThisWeek).minusMinutes(1);
        final DateTime finalThisMonth = finalThisWeekMinusOne.minusWeeks(3);
        final List<Notification> thisMonth = filterByDate(finalThisMonth.toDate(), finalThisWeekMinusOne.toDate());
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.