Skip navigation links


com.thortech.xl.util.adapters
Class tcUtilDateOperations

java.lang.Object
  extended by com.thortech.xl.util.adapters.tcUtilDateOperations


public class tcUtilDateOperations
extends java.lang.Object

This class that has basic date operations utility methods. Author: Solomon Niyazov January 28, 2002. updated by Stanislav Sadykov on July 12, 2002 updated by Stanislav Sadykov on January 24, 2003


Constructor Summary
tcUtilDateOperations()
          Creates a new tcUtilDateOperations object.
tcUtilDateOperations(java.util.Date obj)
          Constructor uses existing Date

 

Method Summary
static java.util.Date addDaysToCurrentDate(int pnNumOfDays)
          Adds a specifed number of days to the current date
static long getCurrentDate()
          method returns current date based on System.currentTimeMillis().
 java.util.Date getDate()
          return Date
 java.lang.String getDayOfMonth()
          Returns the Day Of the Month
 java.lang.String getHours()
          Returns the Hors from the date
 int getIntDayOfMonth()
          Returns the Day of the Month
 int getIntHours()
          Returns the Hours from the Date
 int getIntMinutes()
          Returns Minutes from the Date
 int getIntMonth()
          Returns the Month of the year
 int getIntSeconds()
          Returns Seconds from the Date
 int getIntYear()
          Returns the Year
 java.lang.String getMinutes()
          Returns Minutes from the Date
 java.lang.String getMonth()
          Returns the Month of the Year
 java.lang.String getSeconds()
          Returns Seconds from the Date
 java.lang.String getString()
          Returns the Date as String
 long getTime()
          Returns the date in the long format
 java.lang.String getTimeAsOctalString()
          Returns the date as Octal String
 java.lang.String getTimeLongAsString()
          Returns the Date in Long Format as String type
 java.lang.String getYear()
          Returns the Year
static java.lang.String parseCurrentTimeWithFormat(java.lang.String format)
          method returns current date based on the specified format.
static java.lang.String parseCurrentTimeWithFormatAndTimeZone(java.lang.String format, java.lang.String timeZone)
          method returns current date based on the specified format and timezone.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

tcUtilDateOperations

public tcUtilDateOperations()
Creates a new tcUtilDateOperations object.

tcUtilDateOperations

public tcUtilDateOperations(java.util.Date obj)
Constructor uses existing Date
Parameters:
obj -

Method Detail

addDaysToCurrentDate

public static java.util.Date addDaysToCurrentDate(int pnNumOfDays)
Adds a specifed number of days to the current date
Parameters:
pnNumOfDays - number of days to be added to the current date
Returns:
the result date after addition

getDate

public java.util.Date getDate()
return Date
Returns:
Date

getTime

public long getTime()
Returns the date in the long format
Returns:
long Date

getTimeLongAsString

public java.lang.String getTimeLongAsString()
Returns the Date in Long Format as String type
Returns:
Long date as String

getTimeAsOctalString

public java.lang.String getTimeAsOctalString()
Returns the date as Octal String
Returns:
String

getString

public java.lang.String getString()
Returns the Date as String
Returns:
Date as String

getIntDayOfMonth

public int getIntDayOfMonth()
Returns the Day of the Month
Returns:
Int Day of Month

getDayOfMonth

public java.lang.String getDayOfMonth()
Returns the Day Of the Month
Returns:
Day of month as a String

getIntMonth

public int getIntMonth()
Returns the Month of the year
Returns:
Returns Month Number

getMonth

public java.lang.String getMonth()
Returns the Month of the Year
Returns:
No of Month as String

getIntYear

public int getIntYear()
Returns the Year
Returns:
Year

getYear

public java.lang.String getYear()
Returns the Year
Returns:
Year as a String

getIntHours

public int getIntHours()
Returns the Hours from the Date
Returns:
Hours as Int

getHours

public java.lang.String getHours()
Returns the Hors from the date
Returns:
hours as String

getIntMinutes

public int getIntMinutes()
Returns Minutes from the Date
Returns:
Months from the Date

getMinutes

public java.lang.String getMinutes()
Returns Minutes from the Date
Returns:
Months from the Date

getIntSeconds

public int getIntSeconds()
Returns Seconds from the Date
Returns:
Seconds from the Date

getSeconds

public java.lang.String getSeconds()
Returns Seconds from the Date
Returns:
Seconds from the Date

getCurrentDate

public static long getCurrentDate()
method returns current date based on System.currentTimeMillis().
Returns:
System.currentTimeMillis().

parseCurrentTimeWithFormat

public static java.lang.String parseCurrentTimeWithFormat(java.lang.String format)
method returns current date based on the specified format.
Parameters:
format - for formatting the date
Returns:
date as String based on the specified format

parseCurrentTimeWithFormatAndTimeZone

public static java.lang.String parseCurrentTimeWithFormatAndTimeZone(java.lang.String format,
                                                                     java.lang.String timeZone)
method returns current date based on the specified format and timezone.
Parameters:
format - Format in which date is to be formatted
timeZone - TimeZone to be used
Returns:
date as String based on the specified format and timezone

Skip navigation links


Copyright © 2014, Oracle and/or its affiliates. All rights reserved.