Package com.tietoenator.trip.jxp.session

# Class TdbDateform

java.lang.Object
com.tietoenator.trip.jxp.session.TdbDateform

public class TdbDateform extends Object
Date/time formatting and parsing for the current TRIP dateform. An instance of this class is obtained via the TdbSession method getCurrentDateform().

See Also:
  - `TdbSession.getCurrentDateform()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Date`
  `formatDate(String value)`
  Parses a string with a TRIP DATE value into a Java Date.
  `String`
  `formatDate(Date value)`
  Formats a Java Date into a TRIP DATE string.
  `Date`
  `formatTime(String value)`
  Parses a string with a TRIP TIME value into a Java Date.
  `String`
  `formatTime(Date value)`
  Formats a Java Date into a TRIP TIME string.
  `Date`
  `formatTimestamp(String dateTimeValue)`
  Parses a string with a TRIP time stamp string (such as the lastUpdated value for database designs available via TdbDatabaseDesign) into a Java Date object.
  `Date`
  `formatTimestamp(String dateValue, String timeValue)`
  Parses a string with a TRIP DATE value and a string with a TRIP TIME value into a single Java Date object.
  `int`
  `getDateformNumber()`
  Retrieves the number of the date form represented by this object.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getDateformNumber

    public int getDateformNumber()
    Retrieves the number of the date form represented by this object.

  - ### formatDate

    public Date formatDate(String value) throws TdbException
    Parses a string with a TRIP DATE value into a Java Date.
    Parameters:
      `value` - String with a TRIP DATE value.
    Returns:
      Java Date object
    Throws:
      `TdbException`

  - ### formatDate

    public String formatDate(Date value)
    Formats a Java Date into a TRIP DATE string.
    Parameters:
      `value` - Java date object.
    Returns:
      Date formatted as a string in the current TRIP dateform.

  - ### formatTime

    public String formatTime(Date value)
    Formats a Java Date into a TRIP TIME string.
    Parameters:
      `value` - Java date object.
    Returns:
      The time part of the date object formatted as a string.

  - ### formatTime

    public Date formatTime(String value) throws ParseException
    Parses a string with a TRIP TIME value into a Java Date.
    Parameters:
      `value` - String with a TRIP TIME value.
    Returns:
      Java Date object
    Throws:
      `ParseException`

  - ### formatTimestamp

    public Date formatTimestamp(String dateValue, String timeValue) throws TdbException
    Parses a string with a TRIP DATE value and a string with a TRIP TIME value into a single Java Date object.
    Parameters:
      `dateValue` - Date value in the current TRIP dateform.
      `timeValue` - TRIP time value
    Returns:
      Java Date object
    Throws:
      `TdbException`

  - ### formatTimestamp

    public Date formatTimestamp(String dateTimeValue) throws TdbException
    Parses a string with a TRIP time stamp string (such as the lastUpdated value for database designs available via TdbDatabaseDesign) into a Java Date object.
    Parameters:
      `dateTimeValue` - Time stamp string where the date part is in the current TRIP dateform.
    Returns:
      Java Date object
    Throws:
      `TdbException`