com.geekologue.md4j.util
Class ConvertUtils

java.lang.Object
  extended by com.geekologue.md4j.util.ConvertUtils

public class ConvertUtils
extends java.lang.Object

Conversion utilities without checked exceptions

Author:
manos

Constructor Summary
ConvertUtils()
           
 
Method Summary
static java.util.Date parseDate(java.lang.String date)
          This method attempts to parse the given string to a date using MM/dd/yyyy as a pattern
static java.util.Date parseDate(java.lang.String date, java.lang.String pattern)
          This method attempts to parse the given string to a date
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvertUtils

public ConvertUtils()
Method Detail

parseDate

public static final java.util.Date parseDate(java.lang.String date,
                                             java.lang.String pattern)
This method attempts to parse the given string to a date

Parameters:
date - the date as a string
pattern - the pattern to use for parsing the date
Returns:
the Date constructed by parsing the given string or null if the string was null
Throws:
ConversionException - upon failure to parse using the given pattern

parseDate

public static final java.util.Date parseDate(java.lang.String date)
This method attempts to parse the given string to a date using MM/dd/yyyy as a pattern

Parameters:
date - the date as a string
Returns:
the Date constructed by parsing the given string or null if the string was null
Throws:
ConversionException - upon failure to parse using the default pattern


Copyright © 2003-2007 Manos Batsis. All Rights Reserved.