Examples of DateTime


Examples of org.joda.time.DateTime

    * @return The ISO 8601 Period like "P3Y6M4DT12H30M17S"
    */
   public static String getDifferenceToNow(String utc) {
     if (utc == null) return "";
     utc = ReplaceVariable.replaceAll(utc, " ", "T");
     DateTime now = new DateTime();
     DateTimeFormatter f = ISODateTimeFormat.dateTimeParser();
     DateTime other = f.parseDateTime(utc);
     Period period = new Period(other, now); // Period(ReadableInstant startInstant, ReadableInstant endInstant)
     return period.toString();
   }
View Full Code Here

Examples of org.joda.time.DateTime

            to.isReply = isReply;
            to.recipient = recipient;
            to.senderId = senderId;
            // create a temporary editText that is show in alternate editor
            // the editor will return only new text to us
            final DateTime now = new DateTime(DateTimeZone.UTC);
            final String date = DateFun.FORMAT_DATE_EXT.print(now)
            + " - "
            + DateFun.FORMAT_TIME_EXT.print(now);
            final String fromLine = "----- (sender) ----- " + date + " -----";
            final String editText = newText + fromLine + "\n\n";
View Full Code Here

Examples of org.joda.time.DateTime

        }

        updateSignToolTip();

        // prepare message text
        final DateTime now = new DateTime(DateTimeZone.UTC);
        final String date = DateFun.FORMAT_DATE_EXT.print(now)
                        + " - "
                        + DateFun.FORMAT_TIME_EXT.print(now);
        final String fromLine = "----- " + from + " ----- " + date + " -----";
View Full Code Here

Examples of org.joda.time.DateTime

    public FrostMessageObject() {
    }

    public FrostMessageObject(final boolean isRootnode) {
        setDummy(true);
        setDateAndTime(new DateTime(0, DateTimeZone.UTC));
        setSubject("(root)");
        setNew(false);
        setFromName("");
    }
View Full Code Here

Examples of org.joda.time.DateTime

        try {
            setDateAndTime(mof.getDateAndTime());
        } catch(final Throwable t) {
            // never happens, we already called this method
            setDateAndTime(new DateTime(0, DateTimeZone.UTC));
        }
//        System.out.println("MSG TIME/DATE: time_in="+mof.getTimeStr()+", date_in="+mof.getDateStr()+", out="+getDateAndTime());
        // copy values from mof
        setAttachmentList(mof.getAttachmentList());
        setContent(mof.getContent());
View Full Code Here

Examples of org.joda.time.DateTime

        setMessageId(msgId);
        setBoard(b);
        setDummyInReplyToList(ll);

        setDummy(true);
        setDateAndTime(new DateTime(0, DateTimeZone.UTC));
        setSubject("");
        setNew(false);
        setFromName("");
    }
View Full Code Here

Examples of org.joda.time.DateTime

    }

    public String getDateAndTimeString() {
        if( dateAndTimeString == null ) {
            // Build a String of format yyyy.mm.dd hh:mm:ssGMT
            final DateTime dateTime = new DateTime(getDateAndTime(), DateTimeZone.UTC);
            final DateMidnight date = dateTime.toDateMidnight();
            final TimeOfDay time = dateTime.toTimeOfDay();

            final String dateStr = DateFun.FORMAT_DATE_EXT.print(date);
            final String timeStr = DateFun.FORMAT_TIME_EXT.print(time);

            final StringBuilder sb = new StringBuilder(29);
View Full Code Here

Examples of org.joda.time.DateTime

        final int countTodaysMessages  = MessageStorage.inst().getMessageCount(board, 0);
        final int countAllMessages     = MessageStorage.inst().getMessageCount(board, -1);
        final int countFlaggedMessages = MessageStorage.inst().getFlaggedMessageCount(board);
        final int countStarredMessages = MessageStorage.inst().getStarredMessageCount(board);
        final int countUnreadMessages  = MessageStorage.inst().getUnreadMessageCount(board);
        final DateTime dateTime = MessageStorage.inst().getDateTimeOfLatestMessage(board);
        final String dateStr;
        if (dateTime != null) {
            final DateMidnight date = dateTime.toDateMidnight();
            dateStr = DateFun.FORMAT_DATE_EXT.print(date);
        } else {
            dateStr = "---";
        }
View Full Code Here

Examples of org.joda.time.DateTime

      sb.append("<b>Expression</b>:\n");
      sb.append(regex.getExpression());
      sb.append("\n\n<b>Description</b>:\n");
      sb.append(regex.getDescription());
      sb.append("\n\n<b>Submission date</b>:\n");
      sb.append(new DateTime(regex.getTimestamp() * 1000).toString());

      _regexDescriptionLabel.setText(sb.toString());
      _importRegexButton.setEnabled(true);
      _viewOnlineButton.setEnabled(true);
    }
 
View Full Code Here

Examples of org.joda.time.DateTime

    }
  }

  @Override
  public void jobBegin(AnalysisJob job) {
    String now = new DateTime().toString(DateTimeFormat.fullTime());
    _progressInformationPanel.addUserLog("Job begin (" + now + ")");
  }
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.