public static class EtlVariable.DateUtils
extends java.lang.Object
Provides format/parse operation for date/time.
| Constructor and Description |
|---|
DateUtils() |
| Modifier and Type | Method and Description |
|---|---|
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). |
public java.lang.String now(java.lang.String formatPattern)
formatPattern - format pattern as specified by SimpleDateFormat.SimpleDateFormat,
format(java.util.Date,String)public java.lang.String format(java.util.Date date,
java.lang.String formatPattern)
date - date to format.formatPattern - format pattern as specified by SimpleDateFormat.public java.util.Date parse(java.lang.String dateStr,
java.lang.String formatPattern)
throws java.text.ParseException
java.text.ParseExceptionpublic java.util.Date now()
public java.lang.String today()
Time part is skipped.
public java.lang.String today(java.lang.String formatPattern)
now(String).formatPattern - format pattern.Copyright © Copyright 2006-2019 The Scriptella Project Team.