Package io.odysz.semantic.util
Class JDateFormat
java.lang.Object
io.odysz.semantic.util.JDateFormat
Date formatting and parsing helper.
This is basically used for datatime used in Json / Gson.
For sql format helper, see
This is basically used for datatime used in Json / Gson.
For date format reference, see
Class SimpleDateFormat API at Oracle
For additional information of Json datetime format:
IBM Learn
For sql format helper, see
DateFormat
.- Author:
- ody
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionyyyy-MM-ddstatic String
getDayDiff
(Date date2, Date date1) static long
getDayDiffInt
(Date d2, Date d1) incSeconds
(io.odysz.common.dbtype drvType, String date0, int snds) static JDateFormat
iso8601()
yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g.static JDateFormat
yyyy年MM月dd日'T'HH:mm:ss.SSSZ, e.g.static JDateFormat
Jdate()
yyyy-MM-ddstatic JDateFormat
JdateZh()
yyyy年MM月dd日static JDateFormat
yyyy-MM-dd HH:mm:ss, e.g.
-
Constructor Details
-
JDateFormat
-
-
Method Details
-
JdateZh
yyyy年MM月dd日 -
Jdate
yyyy-MM-dd -
iso8601Zh
yyyy年MM月dd日'T'HH:mm:ss.SSSZ, e.g. 2001年07月04日T12:08:56.235-0700 -
iso8601
yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g. 2001-07-04T12:08:56.235-0700 -
simpleLong
yyyy-MM-dd HH:mm:ss, e.g. 2001-07-04 12:08:56.235 -
format
yyyy-MM-dd- Parameters:
d
-- Returns:
- mysdf.format(d)
-
parse
- Throws:
ParseException
-
incSeconds
public String incSeconds(io.odysz.common.dbtype drvType, String date0, int snds) throws ParseException - Throws:
ParseException
-
getDayDiff
-
getDayDiffInt
-