Package com.seclore.fs.ws.client.util
Class WSClientDateUtil
java.lang.Object
com.seclore.fs.ws.client.util.WSClientDateUtil
This class provides the methods to work with the File secure date format.
The File Secure date format is
"YYYY:MM:DD:HH:mm:SS"
YYYY - The Year as numeric value.
MM - The Month as numeric value.
DD - The Day of the month as numeric value.
HH - The Hour of the day as numeric value in 24 hour format.
mm - The Minute as numeric value.
SS - The Second as numeric value.
e.g.
2009:2:10:13:25:20 is a valid date.
2009:2:10:25:25:20 is a not a valid date, as the total no of hours are 24.
The File Secure date format is
"YYYY:MM:DD:HH:mm:SS"
YYYY - The Year as numeric value.
MM - The Month as numeric value.
DD - The Day of the month as numeric value.
HH - The Hour of the day as numeric value in 24 hour format.
mm - The Minute as numeric value.
SS - The Second as numeric value.
e.g.
2009:2:10:13:25:20 is a valid date.
2009:2:10:25:25:20 is a not a valid date, as the total no of hours are 24.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CalendargetDateFromFSFormat(String pFSDate) This method converts the String FileSecure date format in to the Calendar instance.static StringgetDateInFSFormat(Calendar pCal) This method converts the Calendar instance in to the FileSecure date format.
-
Constructor Details
-
WSClientDateUtil
public WSClientDateUtil()
-
-
Method Details
-
getDateInFSFormat
This method converts the Calendar instance in to the FileSecure date format. If the requested Calendar instance is null then null will be returned.- Parameters:
pCal- The Calendar instance from which the FS date format is requested.- Returns:
- The String value of FileSecure date format generated from the Calendar instance.
-
getDateFromFSFormat
public static Calendar getDateFromFSFormat(String pFSDate) throws com.seclore.fs.ws.client.exception.WSClientException This method converts the String FileSecure date format in to the Calendar instance. Exception will be thrown if the requested String is not correct date, or not in proper FileSecure date format.- Parameters:
pFSDate- - The String in the FS date format.- Returns:
- - The Calendar instance, if the requested date is correct date in FileSecure format, else will throw exception.
- Throws:
com.seclore.fs.ws.client.exception.WSClientException- Thrown if any defined error occurs.
-