2
0
Pascal Peridont 18 жил өмнө
parent
commit
3e4a718bf3

+ 7 - 0
std/mtwin/mail/Part.hx

@@ -143,6 +143,13 @@ class MetaPart<T> {
 		setHeader("Date",mtwin.DateFormat.formatRfc822(d));
 	}
 
+	public function getDate(){
+		var d = getHeader("Date");
+		if( d == null )
+			return null;
+		return mtwin.DateFormat.parse(d);
+	}
+
 	public function setContentId( ?cid : String ) : String {
 		if( cid == null ){
 			var t = getHeader("Content-Id");

+ 5 - 0
std/mtwin/mail/imap/Envelope.hx

@@ -45,7 +45,12 @@ class Envelope {
 	public var messageId(default,null) : String;
 
 	function new(){
+	}
 		
+	public function getDate(){
+		if( date == null )
+			return null;
+		return mtwin.DateFormat.parse(date);
 	}
 
 	public static function parse( s : String ){