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.
-
check(String)
- check date string validation with the default format "yyyy-MM-dd".
-
check(String, String)
- check date string validation with an user defined format.
-
getDateString()
-
-
getDay()
-
For example, String time = DateTime.getFormatString("yyyy-MM-dd HH:mm:ss");
-
getFormatString(String)
-
For example, String time = DateTime.getFormatString("yyyy-MM-dd HH:mm:ss");
-
getMonth()
-
For example, String time = DateTime.getFormatString("yyyy-MM-dd HH:mm:ss");
-
getNumberByPattern(String)
-
For example, String time = DateTime.getFormatString("yyyy-MM-dd HH:mm:ss");
-
getShortDateString()
-
-
getShortTimeString()
-
-
getTimeStampString()
-
-
getTimeString()
-
-
getYear()
-
For example, String time = DateTime.getFormatString("yyyy-MM-dd HH:mm:ss");
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".
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".
getDateString
public static String getDateString()
- Returns:
- formatted string representation of current day with "yyyy-MM-dd".
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.
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.
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.
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.
getShortDateString
public static String getShortDateString()
- Returns:
- formatted string representation of current day with "yyyyMMdd".
getShortTimeString
public static String getShortTimeString()
- Returns:
- formatted string representation of current time with "HHmmss".
getTimeStampString
public static String getTimeStampString()
- Returns:
- formatted string representation of current time with "yyyy-MM-dd-HH:mm:ss".
getTimeString
public static String getTimeString()
- Returns:
- formatted string representation of current time with "HH:mm:ss".
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