Skip to content
Browse files
MIME4J-315 Add a convenient method to parse DateTime
THis enables building DateTime without knowledge of its parser
  • Loading branch information
chibenwa committed May 27, 2022
1 parent d79c2ec commit dc15857d4b999c0f095b4e00aee5d89e1e0047aa
Showing 1 changed file with 8 additions and 0 deletions.
@@ -19,12 +19,20 @@

package org.apache.james.mime4j.dom.datetime;

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.TimeZone;

import org.apache.james.mime4j.field.datetime.parser.DateTimeParser;
import org.apache.james.mime4j.field.datetime.parser.ParseException;

public class DateTime {
public static DateTime parse(InputStream inputStream) throws ParseException {
return new DateTimeParser(inputStream).parseAll();

private final Date date;
private final int year;
private final int month;

0 comments on commit dc15857

Please sign in to comment.