org.apache.jcs.utils.date
Class DateFormatter

java.lang.Object
  extended by org.apache.jcs.utils.date.DateFormatter

public final class DateFormatter
extends Object

This makes standard formatted dates.

This is used by the KeyGenerationUtil.


Method Summary
static String getDddHHmm(Date in)
          gets a date formatted in dddHHmm
static String getDddHHmmss(Date in)
          gets a date formatted in yyyymmddss
static Date parseFormattedStringDddHHmm(String in)
          Takes string that look like 20051017
static Date parseFormattedStringDddHHmmss(String in)
          Takes string that look like 209123934
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parseFormattedStringDddHHmm

public static Date parseFormattedStringDddHHmm(String in)
                                        throws ParseException
Takes string that look like 20051017

Parameters:
in - in
Returns:
Date for the string, if the input is null, null is returned.
Throws:
ParseException - ParseException

getDddHHmm

public static String getDddHHmm(Date in)
gets a date formatted in dddHHmm

Parameters:
in - date
Returns:
date as string

parseFormattedStringDddHHmmss

public static Date parseFormattedStringDddHHmmss(String in)
                                          throws ParseException
Takes string that look like 209123934

Parameters:
in - in
Returns:
Date for the string, if the input is null, null is returned.
Throws:
ParseException - ParseException

getDddHHmmss

public static String getDddHHmmss(Date in)
gets a date formatted in yyyymmddss

Parameters:
in - date
Returns:
date as string


Copyright © 2002-2012 Apache Software Foundation. All Rights Reserved.