public final class Dates extends Object
| Modifier and Type | Method and Description |
|---|---|
static Date |
Date(int year,
int month,
int day)
Creates Date object using human numbers for the year and the month.
|
static Double |
dateDif(Date startDate,
Date endDate,
String unitName)
Calculate difference between two dates
|
static Date |
toDate(String str)
Converts a string to a date using a default pattern.
|
static Date |
toDate(String str,
String pattern)
Converts a string to a date using a pattern.
|
static String |
toString(Date date)
Converts a date to a string using a default pattern.
|
static String |
toString(Date date,
String pattern)
Converts a date to a string using a pattern.
|
public static Date Date(int year, int month, int day)
SimpleDateFormatpublic static String toString(Date date)
public static String toString(Date date, String pattern)
SimpleDateFormatpublic static Date toDate(String str)
public static Date toDate(String str, String pattern)
SimpleDateFormatCopyright © 2004–2019 OpenL Tablets. All rights reserved.