W3C home > Mailing lists > Public > www-validator-cvs@w3.org > October 2009

2006/unicorn/src/org/w3c/unicorn/response/impl DefaultResponseXBeans.java,1.1,1.2

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Mon, 19 Oct 2009 12:42:09 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1MzrYv-0002G4-Hr@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/response/impl
In directory hutz:/tmp/cvs-serv8659/src/org/w3c/unicorn/response/impl

Modified Files:
	DefaultResponseXBeans.java 
Log Message:
modified getDate() method

Index: DefaultResponseXBeans.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/response/impl/DefaultResponseXBeans.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- DefaultResponseXBeans.java	16 Oct 2009 16:24:31 -0000	1.1
+++ DefaultResponseXBeans.java	19 Oct 2009 12:42:07 -0000	1.2
@@ -8,7 +8,6 @@
 import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Date;
-import java.util.GregorianCalendar;
 import java.util.List;
 
 import org.apache.xmlbeans.XmlException;
@@ -120,11 +119,7 @@
 	}
 	
 	public Date getDate() {
-		String[] s = or.getDate().getStringValue().split("-");
-		int year = Integer.parseInt(s[0]);
-		int month = Integer.parseInt(s[1]);
-		int day = Integer.parseInt(s[2]);
-		return new GregorianCalendar(year, month - 1, day).getTime();
+		return or.getDate().getTime();
 	}
 	
 	public String getURI() {
@@ -256,4 +251,10 @@
 		return children;
 	}
 
+	public boolean isPassed() {
+		if (getStatus() == PASSED)
+			return true;
+		return false;
+	}
+
 }
Received on Monday, 19 October 2009 12:42:13 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:39 UTC