Class tcUtilDateOperations

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

public class tcUtilDateOperations extends 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 Details

    • tcUtilDateOperations

      public tcUtilDateOperations()
      Creates a new tcUtilDateOperations object.
    • tcUtilDateOperations

      public tcUtilDateOperations(Date obj)
      Constructor uses existing Date
      Parameters:
      obj -
  • Method Details

    • addDaysToCurrentDate

      public static 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 Date getDate()
      return Date
      Returns:
      Date
    • getTime

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

      public String getTimeLongAsString()
      Returns the Date in Long Format as String type
      Returns:
      Long date as String
    • getTimeAsOctalString

      public String getTimeAsOctalString()
      Returns the date as Octal String
      Returns:
      String
    • getString

      public 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 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 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 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 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 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 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 String parseCurrentTimeWithFormat(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 String parseCurrentTimeWithFormatAndTimeZone(String format, 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