Examples of QDateTime


Examples of com.trolltech.qt.core.QDateTime

        super(since, created);
    }
  // Check if it was within the last day
  @Override
  public boolean attributeCheck(Note n) {
    QDateTime noteDate, current;
    noteDate = noteTime(n);
    current = currentTime();
    if (checkSince)
      return noteDate.daysTo(current) == 0;
    else
      return noteDate.daysTo(current) > 0;
  }
View Full Code Here

Examples of com.trolltech.qt.core.QDateTime

    }

  // Check if it was within the last two days
    @Override
  public boolean attributeCheck(Note n) {
        QDateTime noteDate, current;
        noteDate = noteTime(n);
        current = currentTime();
    if (checkSince)
      return noteDate.daysTo(current) <= 1;
    else
      return noteDate.daysTo(current) > 1;
  }
View Full Code Here

Examples of com.trolltech.qt.core.QDateTime

    }

  // Check if it was within the last two days
    @Override
  public boolean attributeCheck(Note n) {
        QDateTime noteDate, current;
        noteDate = noteTime(n);
        current = currentTime();

    if (checkSince)
      return noteDate.daysTo(current) <= 7;
    else
      return noteDate.daysTo(current) > 7;
  }
View Full Code Here

Examples of com.trolltech.qt.core.QDateTime

    }

  // Check if it was within the last two weeks
    @Override
  public boolean attributeCheck(Note n) {
        QDateTime noteDate, current;
        noteDate = noteTime(n);
        current = currentTime();

    if (checkSince)
      return noteDate.daysTo(current) <= 14;
    else
      return noteDate.daysTo(current) > 14;
  }
View Full Code Here

Examples of com.trolltech.qt.core.QDateTime

    }

  // Check if it was within the last month
    @Override
  public boolean attributeCheck(Note n) {
        QDateTime noteDate, current;
        noteDate = noteTime(n);
        current = currentTime();

    if (checkSince) {
      if (noteDate.date().year() == current.date().year())
        return noteDate.date().month() - current.date().month() == 0;
      else
        return false;
    } else {
      if (noteDate.date().year() < current.date().year())
          return true;
      else
        return noteDate.date().month() - current.date().month() != 0;
    }
  }
View Full Code Here

Examples of com.trolltech.qt.core.QDateTime

    }

  // Check if it was within the last two months
    @Override
  public boolean attributeCheck(Note n) {
        QDateTime noteDate, current;
        noteDate = noteTime(n);
        current = currentTime();

    int ny = noteDate.date().year();
    int cy = current.date().year();
    int nm = noteDate.date().month();
    int cm = current.date().month();

    if (cy-ny >= 0)  {
      cm = cm+12*(cy-ny);
    } else {
View Full Code Here

Examples of com.trolltech.qt.core.QDateTime

    super(since,created);
  }
  // Check if it was within this year
    @Override
  public boolean attributeCheck(Note n) {
        QDateTime noteDate, current;
        noteDate = noteTime(n);
        current = currentTime();

    int ny = noteDate.date().year();
    int cy = current.date().year();
    if (checkSince)
      return cy-ny == 0;
    else
      return cy-ny > 0;
View Full Code Here

Examples of com.trolltech.qt.core.QDateTime

    String fmt = Global.getDateFormat() + " " + Global.getTimeFormat();
    String dateTimeFormat = new String(fmt);
    SimpleDateFormat simple = new SimpleDateFormat(dateTimeFormat);
   
    StringBuilder date = new StringBuilder(simple.format(value));
    QDateTime created = QDateTime.fromString(date.toString(), fmt);
    return created.toString(fmt);
   }
View Full Code Here

Examples of com.trolltech.qt.core.QDateTime

    }

  // Check if it was within the last year
    @Override
  public boolean attributeCheck(Note n) {
        QDateTime noteDate, current;
        noteDate = noteTime(n);
        current = currentTime();

    int ny = noteDate.date().year();
    int cy = current.date().year();
    if (checkSince)
      return cy-ny <=1;
    else
      return cy-ny > 1;
View Full Code Here

Examples of com.trolltech.qt.core.QDateTime

      }
      logger.log(logger.HIGH, "Leaving NeverNote.updateListDateChanged");
    }
    private void updateListDateChanged() {
      logger.log(logger.HIGH, "Entering NeverNote.updateListDateChanged");
      QDateTime date = new QDateTime(QDateTime.currentDateTime());
      updateListDateChanged(currentNoteGuid, date);
      logger.log(logger.HIGH, "Leaving NeverNote.updateListDateChanged");
   
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.