org.dbforms.util
Class TimeUtil

java.lang.Object
  extended by org.dbforms.util.TimeUtil

public class TimeUtil
extends Object

DOCUMENT ME!

Version:
$Revision: 1.24 $
Author:
$author$

Constructor Summary
TimeUtil()
           
 
Method Summary
static Date findEndOfDay(Date d)
          finds the end of the given day
static String minutes2String(long minutes)
          Reformats minutes to time string with format: dd:hh:mm
static Calendar parseDate(SimpleDateFormat format, String s)
          Tries to parse a String into a Calendar objectvalue.
static Date parseISO8601Date(String s)
          Parses an ISO8601 date format string
static String seconds2String(Integer seconds)
          Reformats seconds to time string with format: dd:hh:mm:ss
static String seconds2String(long seconds)
          Reformats seconds to time string with format: dd:hh:mm:ss
static String seconds2String(Long seconds)
          Reformats seconds to time string with format: dd:hh:mm:ss
static String seconds2String(String seconds)
          Reformats seconds to time string with format: dd:hh:mm:ss
static void splitDate(String format, StringBuffer sDate, StringBuffer sTime)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeUtil

public TimeUtil()
Method Detail

seconds2String

public static final String seconds2String(String seconds)
Reformats seconds to time string with format: dd:hh:mm:ss

Parameters:
seconds - string to format
Returns:
String

seconds2String

public static final String seconds2String(Integer seconds)
Reformats seconds to time string with format: dd:hh:mm:ss

Parameters:
seconds - Integer to format
Returns:
String

seconds2String

public static final String seconds2String(Long seconds)
Reformats seconds to time string with format: dd:hh:mm:ss

Parameters:
seconds - string to format
Returns:
String

seconds2String

public static final String seconds2String(long seconds)
Reformats seconds to time string with format: dd:hh:mm:ss

Parameters:
seconds - string to format
Returns:
String

minutes2String

public static final String minutes2String(long minutes)
Reformats minutes to time string with format: dd:hh:mm

Parameters:
seconds - string to format
Returns:
String

findEndOfDay

public static Date findEndOfDay(Date d)
finds the end of the given day

Parameters:
d - date of which end should be find
Returns:
end of the day

parseDate

public static Calendar parseDate(SimpleDateFormat format,
                                 String s)
Tries to parse a String into a Calendar objectvalue. String mustn't a full date, parts are enough. Parsing will set missing parts to default values

Parameters:
loc - locale to use
format - java format string for date/time
s - string to be parsed
Returns:
the parsed date

parseISO8601Date

public static Date parseISO8601Date(String s)
Parses an ISO8601 date format string

Parameters:
s - string to be parsed
Returns:
the parsed date

splitDate

public static void splitDate(String format,
                             StringBuffer sDate,
                             StringBuffer sTime)


Copyright © 2002-2006 DbForms. All Rights Reserved.