public final class DateUtil extends Object
Modifier and Type | Method and Description |
---|---|
static int |
calculateAge(String dateVal,
org.joda.time.DateTime now,
String pattern)
Calculates the age for a given date string.
|
static Timestamp |
currentTimeStamp()
Generates the current timestamp.
|
static boolean |
isValidFormatDate(String dateValueTmp,
String pattern)
Validates the dateValue format: a) if has a valid size; b) if has a numeric
value; Note: dateValue must have the format yyyyMMdd.
|
public static boolean isValidFormatDate(String dateValueTmp, String pattern)
dateValueTmp
- The date to be validated.pattern
- The accepted date format.public static int calculateAge(String dateVal, org.joda.time.DateTime now, String pattern)
dateVal
- The date to be validated.now
- The current date.pattern
- The date pattern.public static Timestamp currentTimeStamp()
Copyright © 2020. All Rights Reserved.