All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.lgeds.jdf.DateTime

java.lang.Object
   |
   +----com.lgeds.jdf.DateTime

public final class DateTime
extends Object
Author:
WonYoung Lee, wyounglee@lgeds.lg.co.kr.

Method Index

 o check(String)
check date string validation with the default format "yyyy-MM-dd".
 o check(String, String)
check date string validation with an user defined format.
 o getDateString()
 o getDay()
For example, String time = DateTime.getFormatString("yyyy-MM-dd HH:mm:ss");
 o getFormatString(String)
For example, String time = DateTime.getFormatString("yyyy-MM-dd HH:mm:ss");
 o getMonth()
For example, String time = DateTime.getFormatString("yyyy-MM-dd HH:mm:ss");
 o getNumberByPattern(String)
For example, String time = DateTime.getFormatString("yyyy-MM-dd HH:mm:ss");
 o getShortDateString()
 o getShortTimeString()
 o getTimeStampString()
 o getTimeString()
 o getYear()
For example, String time = DateTime.getFormatString("yyyy-MM-dd HH:mm:ss");

Methods

 o check
 public static void check(String s) throws Exception
check date string validation with the default format "yyyy-MM-dd".

Parameters:
s - date string you want to check with default format "yyyy-MM-dd".
 o check
 public static void check(String s,
                          String format) throws ParseException
check date string validation with an user defined format.

Parameters:
s - date string you want to check.
format - string representation of the date format. For example, "yyyy-MM-dd".
 o getDateString
 public static String getDateString()
Returns:
formatted string representation of current day with "yyyy-MM-dd".
 o getDay
 public static int getDay()
For example, String time = DateTime.getFormatString("yyyy-MM-dd HH:mm:ss");

Parameters:
java.lang.String - pattern "yyyy, MM, dd, HH, mm, ss and more"
Returns:
formatted string representation of current day and time with your pattern.
 o getFormatString
 public static String getFormatString(String pattern)
For example, String time = DateTime.getFormatString("yyyy-MM-dd HH:mm:ss");

Parameters:
java.lang.String - pattern "yyyy, MM, dd, HH, mm, ss and more"
Returns:
formatted string representation of current day and time with your pattern.
 o getMonth
 public static int getMonth()
For example, String time = DateTime.getFormatString("yyyy-MM-dd HH:mm:ss");

Parameters:
java.lang.String - pattern "yyyy, MM, dd, HH, mm, ss and more"
Returns:
formatted string representation of current day and time with your pattern.
 o getNumberByPattern
 public static int getNumberByPattern(String pattern)
For example, String time = DateTime.getFormatString("yyyy-MM-dd HH:mm:ss");

Parameters:
java.lang.String - pattern "yyyy, MM, dd, HH, mm, ss and more"
Returns:
formatted string representation of current day and time with your pattern.
 o getShortDateString
 public static String getShortDateString()
Returns:
formatted string representation of current day with "yyyyMMdd".
 o getShortTimeString
 public static String getShortTimeString()
Returns:
formatted string representation of current time with "HHmmss".
 o getTimeStampString
 public static String getTimeStampString()
Returns:
formatted string representation of current time with "yyyy-MM-dd-HH:mm:ss".
 o getTimeString
 public static String getTimeString()
Returns:
formatted string representation of current time with "HH:mm:ss".
 o getYear
 public static int getYear()
For example, String time = DateTime.getFormatString("yyyy-MM-dd HH:mm:ss");

Parameters:
java.lang.String - pattern "yyyy, MM, dd, HH, mm, ss and more"
Returns:
formatted string representation of current day and time with your pattern.

All Packages  Class Hierarchy  This Package  Previous  Next  Index