Examples of minusHours()


Examples of de.jetwick.util.MyDate.minusHours()

    public void testSuggestFilterRemoval() {
        MyDate md = new MyDate();
        twSearch.testUpdate(Arrays.asList(
                createTweet(1L, "RT @user3: test this first tweet", "peter").setCreatedAt(md.toDate()),
                createTweet(2L, "test others", "peter2").setCreatedAt(md.toDate()),
                createTweet(3L, "testnot this", "peter3").setCreatedAt(md.minusHours(2).toDate()),
                createTweet(4L, "test this", "peter4").setCreatedAt(md.toDate())));

        JetwickQuery q = new TweetQuery(false).addIsOriginalTweetFilter().
                addLatestDateFilter(1).
                addUserFilter("peter");
View Full Code Here

Examples of de.jetwick.util.MyDate.minusHours()

    public void testSuggestFilterRemoval2() {
        MyDate md = new MyDate();
        twSearch.testUpdate(Arrays.asList(
                createTweet(1L, "RT @user3: test this first tweet", "peter1").setCreatedAt(md.toDate()),
                createTweet(2L, "test others", "peter2").setCreatedAt(md.toDate()),
                createTweet(3L, "testnot this", "peter3").setCreatedAt(md.minusHours(2).toDate()),
                createTweet(4L, "test this", "peter4").setCreatedAt(md.toDate())));

        JetwickQuery q = new TweetQuery(false).addIsOriginalTweetFilter().
                addLatestDateFilter(1).
                addUserFilter("peter");
View Full Code Here

Examples of de.jetwick.util.MyDate.minusHours()

    @Test
    public void testSuggestFilterForceDate() {
        MyDate md = new MyDate();
        twSearch.testUpdate(Arrays.asList(
                createTweet(2L, "test others", "peter2").setCreatedAt(md.minusHours(2).toDate()),
                createTweet(3L, "testnot this", "peter3").setCreatedAt(md.minusHours(2).toDate())));

        JetwickQuery q = new TweetQuery(false).addLatestDateFilter(1);
        Collection<String> keys = twSearch.suggestRemoval(q);
        assertEquals(1, keys.size());
View Full Code Here

Examples of de.jetwick.util.MyDate.minusHours()

    @Test
    public void testSuggestFilterForceDate() {
        MyDate md = new MyDate();
        twSearch.testUpdate(Arrays.asList(
                createTweet(2L, "test others", "peter2").setCreatedAt(md.minusHours(2).toDate()),
                createTweet(3L, "testnot this", "peter3").setCreatedAt(md.minusHours(2).toDate())));

        JetwickQuery q = new TweetQuery(false).addLatestDateFilter(1);
        Collection<String> keys = twSearch.suggestRemoval(q);
        assertEquals(1, keys.size());
        Iterator<String> iter = keys.iterator();
View Full Code Here

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

    TimePeriod tq = hshSupportedTimePeriods.get(timeQuery);

    if (tq != null) {
      switch (tq) {
      case THISHOUR:
        return dt.minusHours(1).getMillis();
      case LASTHOUR:
        return dt.minusHours(2).getMillis();
      case LASTTFHOURS:
        return dt.minusHours(24).getMillis();
      case TODAY:
View Full Code Here

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

    if (tq != null) {
      switch (tq) {
      case THISHOUR:
        return dt.minusHours(1).getMillis();
      case LASTHOUR:
        return dt.minusHours(2).getMillis();
      case LASTTFHOURS:
        return dt.minusHours(24).getMillis();
      case TODAY:
        return dt.minusHours(24).getMillis();
      case YESTERDAY:
View Full Code Here

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

      case THISHOUR:
        return dt.minusHours(1).getMillis();
      case LASTHOUR:
        return dt.minusHours(2).getMillis();
      case LASTTFHOURS:
        return dt.minusHours(24).getMillis();
      case TODAY:
        return dt.minusHours(24).getMillis();
      case YESTERDAY:
        return dt.minusHours(48).getMillis();
      case THISWEEK:
View Full Code Here

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

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

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

      case LASTTFHOURS:
        return dt.minusHours(24).getMillis();
      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:
View Full Code Here

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

    if (tq != null) {
      switch (tq) {
      case THISHOUR:
        return dt.getMillis();
      case LASTHOUR:
        return dt.minusHours(1).getMillis();
      case LASTTFHOURS:
        return dt.getMillis();
      case TODAY:
        return dt.getMillis();
      case YESTERDAY:
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.