Package org.apache.james.mime4j.field.datetime.parser

Examples of org.apache.james.mime4j.field.datetime.parser.DateTimeParser$Date


        return value;
    }

    private Date toISODate(String value) throws ParseException {
        final StringReader reader = new StringReader(value);
        final DateTime dateTime = new DateTimeParser(reader).parseAll();
        Calendar cal = getGMT();
        cal.set(dateTime.getYear(), dateTime.getMonth() - 1, dateTime.getDay(), dateTime.getHour(), dateTime.getMinute(), dateTime.getSecond());
        return cal.getTime();
    }
View Full Code Here


                   
                    if (f instanceof DateTimeField) {
                        // We need to make sure we convert it to GMT
                        final StringReader reader = new StringReader(f.getBody());
                        try {
                            DateTime dateTime = new DateTimeParser(reader).parseAll();
                            Calendar cal = getGMT();
                            cal.set(dateTime.getYear(), dateTime.getMonth() - 1, dateTime.getDay(), dateTime.getHour(), dateTime.getMinute(), dateTime.getSecond());
                            sentDate =  cal.getTime();
                           
                        } catch (org.apache.james.mime4j.field.datetime.parser.ParseException e) {
View Full Code Here

            monitor.warn("Parsing " + paramName + " null", "returning null");
            return null;
        }

        try {
            return new DateTimeParser(new StringReader(value)).parseAll()
                    .getDate();
        } catch (org.apache.james.mime4j.field.datetime.parser.ParseException e) {
            if (monitor.isListening()) {
                monitor.warn(paramName + " parameter is invalid: " + value,
                        paramName + " parameter is ignored");
View Full Code Here

TOP

Related Classes of org.apache.james.mime4j.field.datetime.parser.DateTimeParser$Date

Copyright © 2018 www.massapicom. 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.