org.apache.ftpserver.util
Class DateUtils

java.lang.Object
  extended byorg.apache.ftpserver.util.DateUtils

public class DateUtils
extends java.lang.Object

This is a timezone conversion utility class.

Author:
Rana Bhattacharyya

Constructor Summary
DateUtils()
           
 
Method Summary
static java.util.Calendar getCalendar(java.util.Date dt, java.util.TimeZone to)
          Get the timezone specific calendar.
static java.util.Date getDate(java.lang.String str, java.text.DateFormat df, java.util.TimeZone from)
          Get date object.
static java.lang.String getDifference(java.util.Date d1, java.util.Date d2)
          Get date difference => d1 - d2.
static java.lang.String getString(java.util.Date dt, java.text.DateFormat df, java.util.TimeZone to)
          Get the timezone specific string.
static java.lang.String getUnixDate(java.util.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 java.lang.String getUnixDate(java.util.Date date)
Get unix style date string.


getString

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


getCalendar

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


getDate

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

Throws:
java.text.ParseException

getDifference

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



Copyright © -2005 . All Rights Reserved.