Vararging parseDate methods. LANG-396
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@925963 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8d20f34c7d
commit
2c6e919e65
|
@ -284,7 +284,7 @@ public class DateUtils {
|
||||||
* @throws IllegalArgumentException if the date string or pattern array is null
|
* @throws IllegalArgumentException if the date string or pattern array is null
|
||||||
* @throws ParseException if none of the date patterns were suitable (or there were none)
|
* @throws ParseException if none of the date patterns were suitable (or there were none)
|
||||||
*/
|
*/
|
||||||
public static Date parseDate(String str, String[] parsePatterns) throws ParseException {
|
public static Date parseDate(String str, String... parsePatterns) throws ParseException {
|
||||||
return parseDateWithLeniency(str, parsePatterns, true);
|
return parseDateWithLeniency(str, parsePatterns, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,7 +304,7 @@ public class DateUtils {
|
||||||
* @throws ParseException if none of the date patterns were suitable
|
* @throws ParseException if none of the date patterns were suitable
|
||||||
* @since 2.5
|
* @since 2.5
|
||||||
*/
|
*/
|
||||||
public static Date parseDateStrictly(String str, String[] parsePatterns) throws ParseException {
|
public static Date parseDateStrictly(String str, String... parsePatterns) throws ParseException {
|
||||||
return parseDateWithLeniency(str, parsePatterns, false);
|
return parseDateWithLeniency(str, parsePatterns, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue