steve.pums.assess.useful
Class DateFormatter

java.lang.Object
  extended by steve.pums.assess.useful.DateFormatter

public class DateFormatter
extends java.lang.Object

Used for date/time formatting to make insertions into MySQL


Constructor Summary
DateFormatter()
          Creates a new instance of DateFormatter
DateFormatter(java.util.Date origDate)
          Creates a new instance of DateFormatter with initial date
DateFormatter(java.lang.String origDateStr)
          Creates a new instance of DateFormatter with initial date string
 
Method Summary
 java.lang.String format()
          Applies formatting to date
 java.lang.String timeformat(java.util.Date origDate)
          Applies formatting to time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateFormatter

public DateFormatter()
Creates a new instance of DateFormatter


DateFormatter

public DateFormatter(java.lang.String origDateStr)
Creates a new instance of DateFormatter with initial date string

Parameters:
origDateStr - Date string to be formatted

DateFormatter

public DateFormatter(java.util.Date origDate)
Creates a new instance of DateFormatter with initial date

Parameters:
origDate - Date to be formatted
Method Detail

format

public java.lang.String format()
                        throws java.text.ParseException
Applies formatting to date

Returns:
Formatted date
Throws:
java.text.ParseException - As a result of parsing error

timeformat

public java.lang.String timeformat(java.util.Date origDate)
                            throws java.text.ParseException
Applies formatting to time

Parameters:
origDate - Time to be formatted
Returns:
Formatted time
Throws:
java.text.ParseException - As a result of parsing error