Package devplugin

Examples of devplugin.Date.compareTo()


      mGlobalReminderList.blockProgram(program);
      // text label
      String msg;
      final int progMinutesAfterMidnight = program.getStartTime();
      int remainingMinutes = 0;
      if (today.compareTo(program.getDate()) >= 0
          && IOUtilities.getMinutesAfterMidnight() > progMinutesAfterMidnight) {
        msg = updateRunningTime();
      } else {
        msg = mLocalizer.msg("soonStarts", "Soon starts");
        remainingMinutes = ReminderPlugin.getTimeToProgramStart(program);
View Full Code Here


    TVBrowserActions.update.setUpdating(true);

    if(!Settings.propPluginInfoDialogWasShown.getBoolean()) {
      Date compareDate = Settings.propFirstStartDate.getDate().addDays((int)(Math.random() * 4 + 3));

      if(compareDate.compareTo(Date.getCurrentDate()) <= 0) {
        showPluginInfoDlg();
        Settings.propPluginInfoDialogWasShown.setBoolean(true);
      }
    }

View Full Code Here

   *          The program to check.
   * @return True if the program runs.
   */
  public static boolean isOnAir(Program p) {
    Date currentDate = Date.getCurrentDate();
    if (currentDate.compareTo(p.getDate()) < 0) {
      return false;
    }
    int programNextDayEqualsToday = p.getDate().addDays(1).compareTo(currentDate);
    if (programNextDayEqualsToday < 0) {
      return false;
View Full Code Here

          int month = Integer.parseInt(fileName.substring(5, 7));
          int day = Integer.parseInt(fileName.substring(8, 10));
          Date date = new Date(year, month, day);

          // Is this day program older than the deadline day?
          if (date.compareTo(deadlineDay) < 0) {
            // It is -> delete the file
            element.delete();
          }
        }
        catch (Exception exc) {
View Full Code Here

          throw new PreparationException("Raw file name has wrong pattern: "
            + fileName, exc);
        }

        // Ensure that the file is not outdated
        if (date.compareTo(mDeadlineDay) >= 0) {
          // Load the file
          DayProgramFile rawFile;
          try {
            rawFile = new DayProgramFile();
            rawFile.readFromFile(element);
View Full Code Here

        int day = Integer.parseInt(asString.substring(8, 10));
        lastupdated = new Date(year, month, day);

        mLog.info("Done !");

        return lastupdated.compareTo(new Date().addDays(-MAX_LAST_UPDATE_DAYS)) >= 0;
      }
    }catch(NumberFormatException parseException) {
      mLog.info("The file on the server has the wrong format!");
    }
View Full Code Here

      int year = Integer.parseInt(fileName.substring(0, 4));
      int month = Integer.parseInt(fileName.substring(5, 7));
      int day = Integer.parseInt(fileName.substring(8, 10));
      Date date = new Date(year, month, day);
     
      return date.compareTo(mDeadlineDay) >= 0;
    }
    catch (Exception exc) {
      throw new UpdateException("Day program file name has wrong pattern: "
        + fileName, exc);
    }
View Full Code Here

    for (String key : knownProgArr) {
      Date date = getDateFromFileName(key);
      // Check whether this file is still present AND not expired
      // (The key is equal to the file name)
      if (!tvDataFiles.containsKey(key)
          || (date != null && date.compareTo(expireDate) < 0)) {
        // This day program was deleted -> Inform the listeners

        // Get the channel and date
        Channel channel = getChannelFromFileName(key, channelArr, channelIdArr);
        if ((channel != null) && (date != null)) {
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.