Package org.apache.commons.lang.time

Examples of org.apache.commons.lang.time.FastDateFormat.format()


    messageIdField.setText(message.getJMSMessageID());
    replyToField.setText(JMSUtils.getDestinationName(message.getJMSReplyTo()));
    destinationField.setText(JMSUtils.getDestinationName(message.getJMSDestination()));
    correlationIDField.setText(message.getJMSCorrelationID());
    typeField.setText(message.getJMSType());
    timestampField.setText(fmt.format(new Date(message.getJMSTimestamp())));
    expirationSpinner.setValue(message.getJMSExpiration());
    priroritySpinner.setValue(message.getJMSPriority());
    if (message instanceof TextMessage) {
      messageTypeCombo.setSelectedItem(MessageType.TextMessage);
    } else if (message instanceof BytesMessage) {
View Full Code Here


    private String formatAsImap(Date date, TimeZone zone) {
        assertNotNull(date);
        FastDateFormat format = FastDateFormat.getInstance(
                "dd-MMM-yyyy hh:mm:ss Z", zone, Locale.US);
        String out = format.format(date);
        if (out.charAt(0) == '0') {
            out = ' ' + out.substring(1, out.length());
        }
        return out;
    }
View Full Code Here

     *            <code>Date</code>, not null
     * @return encoded IMAP <code>date-time</code>, not null
     */
    public static String encodeDateTime(final Date date) {
        final FastDateFormat format = FastDateFormat.getInstance("dd-MMM-yyyy HH:mm:ss Z", TimeZone.getTimeZone("GMT"), Locale.US);
        final String result = format.format(date);
        return result;
    }
}
View Full Code Here

    private String formatAsImap(Date date, TimeZone zone) {
        assertNotNull(date);
        FastDateFormat format = FastDateFormat.getInstance(
                "dd-MMM-yyyy hh:mm:ss Z", zone, Locale.US);
        String out = format.format(date);
        if (out.charAt(0) == '0') {
            out = ' ' + out.substring(1, out.length());
        }
        return out;
    }
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.