Commented out the parseCVS code for consideration/fixing for Lang 2.1

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137600 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2003-08-15 16:14:35 +00:00
parent cebf61b873
commit 7c2ce42936
2 changed files with 13 additions and 11 deletions

View File

@ -74,7 +74,7 @@ import java.util.TimeZone;
* @author Janek Bogucki
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
* @since 2.0
* @version $Id: DateUtils.java,v 1.11 2003/08/10 13:32:16 stevencaswell Exp $
* @version $Id: DateUtils.java,v 1.12 2003/08/15 16:14:35 bayard Exp $
*/
public class DateUtils {
@ -409,14 +409,14 @@ public class DateUtils {
}
// TODO: Decide whether this code is removed or goes into 2.1
//-----------------------------------------------------------------------
/**
/*
* <p>Parses a date string formatted in CVS format.</p>
*
* @param dateStr the date to parse
* @return the parsed date
* @throws IllegalArgumentException if the date cannot be parsed
*/
public static Calendar parseCVS(String dateStr) {
if (dateStr == null) {
throw new IllegalArgumentException("The date must not be null");
@ -527,6 +527,7 @@ public class DateUtils {
throw new IllegalArgumentException("Unable to parse '" + dateStr + "'.");
}
*/
//-----------------------------------------------------------------------
/**

View File

@ -363,10 +363,10 @@ public class DateUtilsTest extends TestCase {
} catch (ClassCastException ex) {}
}
/**
// TODO: Decide whether this code is removed or goes into 2.1
/*
* Tests the parse method, which is supposed to handle various strings
* as flexibly as CVS supports.
*/
public void testParseCVS() throws Exception {
try {
DateUtils.parseCVS(null);
@ -414,12 +414,12 @@ public class DateUtilsTest extends TestCase {
assertEquals("parseCVS format MMM d, yyyy h:mm a",
now, DateUtils.parseCVS(new SimpleDateFormat("MMM d, yyyy h:mm a").format(now.getTime())), 50);
// h:mm z
/*
* This format is difficult to test using the current time because the
* parseCVS method applies the default date of January 1, 1970 to the
* parsed time. The most straightforward way to test the parse is to
* pass in a known value, and test the output against this know value.
*/
//
// This format is difficult to test using the current time because the
// parseCVS method applies the default date of January 1, 1970 to the
// parsed time. The most straightforward way to test the parse is to
// pass in a known value, and test the output against this know value.
//
now = Calendar.getInstance();
now.setTime(new SimpleDateFormat("h:mm z").parse("16:30 GMT"));
assertEquals("parseCVS format h:mm z 16:30 GMT",
@ -567,6 +567,7 @@ public class DateUtilsTest extends TestCase {
assertEquals("parseCVS last January",
now, DateUtils.parseCVS("last January"), 50);
}
*/
/**
* Tests the iterator exceptions