Purple Code

com.purpletech.util
Class DateUtils

java.lang.Object
  |
  +--com.purpletech.util.DateUtils

public class DateUtils
extends java.lang.Object

Author:
Alex Chaffee (alex@jguru.com)

Nested Class Summary
static class DateUtils.ISO8601
           
 
Field Summary
static boolean debug
           
static java.text.DateFormat iso8601DateFormat
           
protected static java.lang.String reISO8601
           
static java.text.DateFormat sqlDateFormat
           
static java.text.DateFormat standardDateFormat
           
 
Constructor Summary
DateUtils()
           
 
Method Summary
static void main(java.lang.String[] args)
           
static java.util.Date parseDate(java.lang.String s)
          Tries to parse the date according to several different formats.
static DateUtils.ISO8601 parseISO8601(java.lang.String s)
           
static int toInt(java.lang.String x)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static boolean debug

reISO8601

protected static java.lang.String reISO8601

iso8601DateFormat

public static java.text.DateFormat iso8601DateFormat

standardDateFormat

public static java.text.DateFormat standardDateFormat

sqlDateFormat

public static java.text.DateFormat sqlDateFormat
Constructor Detail

DateUtils

public DateUtils()
Method Detail

parseDate

public static java.util.Date parseDate(java.lang.String s)
Tries to parse the date according to several different formats.

BUG in TimeZone processing -- Calendar class always screws up the time when a TZ is set -- so ignored for now.

Returns:
null if not parseable

parseISO8601

public static DateUtils.ISO8601 parseISO8601(java.lang.String s)

toInt

public static int toInt(java.lang.String x)

main

public static void main(java.lang.String[] args)

Documentation generated March 5 2003