com.sap.portal.httpconnectivity.transformationservice.xslextensions

Class XSLDateFormatter

java.lang.Object
  extended by com.sap.portal.httpconnectivity.transformationservice.xslextensions.XSLDateFormatter

public class XSLDateFormatter
extends Object

Formats a date according to the specified date format.


Constructor Summary
XSLDateFormatter()
          A class constructor that sets creates a new XSLDateFormatter object.
XSLDateFormatter(String inDate, String format)
          A constructor that sets the date and output format.
 
Method Summary
 String format(String date)
          Formats a date according to the specified format.
static String formatDate(String date, String format)
          Formats the date using the specified format.
static String formatDate(String date, String inFormat, String outFormat)
          Formats a date with the initial format defined in the inFormat parameter to a new format defined in the outFormat parameter.
 void setDate(String date)
          Sets the date.
 void setFormat(String format)
          Sets the output format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSLDateFormatter

public XSLDateFormatter()
A class constructor that sets creates a new XSLDateFormatter object.


XSLDateFormatter

public XSLDateFormatter(String inDate,
                        String format)
A constructor that sets the date and output format.

Parameters:
inDate - a date
format - an output format
Method Detail

setDate

public void setDate(String date)
Sets the date.

Parameters:
date - a date

setFormat

public void setFormat(String format)
Sets the output format.

Parameters:
format - an output format

format

public String format(String date)
Formats a date according to the specified format.

Parameters:
date - a date
Returns:
a formatted string representing the specified date

formatDate

public static String formatDate(String date,
                                String format)
Formats the date using the specified format.

Parameters:
date - a date
format - an output format
Returns:
a formatted string representing the specified date with the specified output format. The original date is returned if it cannot be formatted.

formatDate

public static String formatDate(String date,
                                String inFormat,
                                String outFormat)
Formats a date with the initial format defined in the inFormat parameter to a new format defined in the outFormat parameter.

Parameters:
date - a date
inFormat - an input format
outFormat - an output format
Returns:
a formatted string representing the specified date with the specified output format. The original date is returned if it cannot be formatted.
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-ADMIN [sap.com] tc/ep/admin/api/extd api EP-PIN


Copyright 2011 SAP AG Complete Copyright Notice