org.apache.ftpserver.util
Class DateUtils

java.lang.Object
  extended by org.apache.ftpserver.util.DateUtils

public class DateUtils
extends Object

This is a timezone conversion utility class.

Author:
Rana Bhattacharyya

Constructor Summary
DateUtils()
           
 
Method Summary
static Calendar getCalendar(Date dt, TimeZone to)
          Get the timezone specific calendar.
static Date getDate(String str, DateFormat df, TimeZone from)
          Get date object.
static String getDifference(Date d1, Date d2)
          Get date difference => d1 - d2.
static String getString(Date dt, DateFormat df, TimeZone to)
          Get the timezone specific string.
static String getUnixDate(Date date)
          Get unix style date string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateUtils

public DateUtils()
Method Detail

getUnixDate

public static String getUnixDate(Date date)
Get unix style date string.


getString

public static String getString(Date dt,
                               DateFormat df,
                               TimeZone to)
Get the timezone specific string.


getCalendar

public static Calendar getCalendar(Date dt,
                                   TimeZone to)
Get the timezone specific calendar.


getDate

public static Date getDate(String str,
                           DateFormat df,
                           TimeZone from)
                    throws ParseException
Get date object.

Throws:
ParseException

getDifference

public static String getDifference(Date d1,
                                   Date d2)
Get date difference => d1 - d2.



Copyright © 2001-2012 Codehaus. All Rights Reserved.