scriptella.expression
Class EtlVariable.DateUtils

java.lang.Object
  extended by scriptella.expression.EtlVariable.DateUtils
Enclosing class:
EtlVariable

public static class EtlVariable.DateUtils
extends java.lang.Object

Utility class for ETL file expressions.

Provides format/parse operation for date/time.


Constructor Summary
EtlVariable.DateUtils()
           
 
Method Summary
 java.lang.String format(java.util.Date date, java.lang.String formatPattern)
          Formats a specified date/time according to the specified pattern.
 java.util.Date now()
          Returns the current date.
 java.lang.String now(java.lang.String formatPattern)
          Returns a current date/time formatted according to the specified format.
 java.util.Date parse(java.lang.String dateStr, java.lang.String formatPattern)
           
 java.lang.String today()
          Returns the formatted representation of current date.
 java.lang.String today(java.lang.String formatPattern)
          A synonym for now(String).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EtlVariable.DateUtils

public EtlVariable.DateUtils()
Method Detail

now

public java.lang.String now(java.lang.String formatPattern)
Returns a current date/time formatted according to the specified format.

Parameters:
formatPattern - format pattern as specified by SimpleDateFormat.
Returns:
formatted string representation of current date/time.
See Also:
SimpleDateFormat, format(java.util.Date,String)

format

public java.lang.String format(java.util.Date date,
                               java.lang.String formatPattern)
Formats a specified date/time according to the specified pattern.

Parameters:
date - date to format.
formatPattern - format pattern as specified by SimpleDateFormat.
Returns:
formatted string representation of the specified date/time.

parse

public java.util.Date parse(java.lang.String dateStr,
                            java.lang.String formatPattern)
                     throws java.text.ParseException
Throws:
java.text.ParseException

now

public java.util.Date now()
Returns the current date.

Returns:
current date/time.

today

public java.lang.String today()
Returns the formatted representation of current date.

Time part is skipped.

Returns:
formatted representation of current date.

today

public java.lang.String today(java.lang.String formatPattern)
A synonym for now(String).

Parameters:
formatPattern - format pattern.
Returns:
formatted date.


Copyright © Copyright 2006-2009 The Scriptella Project Team.