Class ISODate
java.lang.Object
org.jpos.iso.ISODate
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringformatDate(Date d, String pattern) Formats a date object, using the default time zone for this host WARNING: See important issue related to date pattern.static StringformatDate(Date d, String pattern, TimeZone timeZone) You should use this version of formatDate() if you want a specific timeZone to calculate the date on.static Stringstatic StringgetANSIDate(Date d) static StringgetANSIDate(Date d, TimeZone timeZone) static Stringstatic Stringstatic StringgetDateTime(Date d) static StringgetDateTime(Date d, TimeZone timeZone) static Stringstatic StringgetEuropeanDate(Date d, TimeZone timeZone) static Stringstatic StringgetExpirationDate(Date d, TimeZone timeZone) static Stringstatic StringgetJulianDate(Date d, TimeZone timeZone) static Stringstatic Stringstatic Dateconverts a string in DD/MM/YY format to a Date object Warning: return null on invalid dates (prints Exception to console) Uses default time zone for this hoststatic Dateconverts a string in DD/MM/YY format to a Date object Warning: return null on invalid dates (prints Exception to console)static Dateconverts a string in DD/MM/YY HH:MM:SS format to a Date object Warning: return null on invalid dates (prints Exception to console) Uses default time zone for this hoststatic DateparseDateTime(String s, TimeZone timeZone) converts a string in DD/MM/YY HH:MM:SS format to a Date object Warning: return null on invalid dates (prints Exception to console)static Datetry to find out suitable date given [YY[YY]]MMDDhhmmss format
(difficult thing being finding out appropiate year)static DateparseISODate(String d, long currentTime) try to find out suitable date given [YY[YY]]MMDDhhmmss format
(difficult thing being finding out appropiate year)static DateparseISODate(String d, long currentTime, TimeZone timeZone) try to find out suitable date given [YY[YY]]MMDDhhmmss format
(difficult thing being finding out appropiate year)static DateparseISODate(String d, TimeZone timeZone) try to find out suitable date given [YY[YY]]MMDDhhmmss format
(difficult thing being finding out appropiate year)
-
Field Details
-
ONE_YEAR
- See Also:
-
-
Method Details
-
formatDate
Formats a date object, using the default time zone for this host WARNING: See important issue related to date pattern.- Parameters:
d- date object to be formattedpattern- to be used for formatting
-
formatDate
You should use this version of formatDate() if you want a specific timeZone to calculate the date on. WARNING: See important issue related to date pattern.- Parameters:
d- date object to be formattedpattern- to be used for formattingtimeZone- for GMT for example, use TimeZone.getTimeZone("GMT") and for Uruguay use TimeZone.getTimeZone("GMT-03:00")
-
parse
-
parse
converts a string in DD/MM/YY format to a Date object Warning: return null on invalid dates (prints Exception to console)- Parameters:
s- String in DD/MM/YY recorded in timeZonetimeZone- for GMT for example, use TimeZone.getTimeZone("GMT") and for Uruguay use TimeZone.getTimeZone("GMT-03:00")- Returns:
- parsed Date (or null)
-
parseDateTime
converts a string in DD/MM/YY HH:MM:SS format to a Date object Warning: return null on invalid dates (prints Exception to console) Uses default time zone for this host- Returns:
- parsed Date (or null)
-
parseDateTime
converts a string in DD/MM/YY HH:MM:SS format to a Date object Warning: return null on invalid dates (prints Exception to console)- Parameters:
s- string in DD/MM/YY HH:MM:SS format recorded in timeZonetimeZone- for GMT for example, use TimeZone.getTimeZone("GMT") and for Uruguay use TimeZone.getTimeZone("GMT-03:00")- Returns:
- parsed Date (or null)
-
parseISODate
try to find out suitable date given [YY[YY]]MMDDhhmmss format
(difficult thing being finding out appropiate year)- Parameters:
d- date formated as [YY[YY]]MMDDhhmmss, typical field 13 + field 12- Returns:
- Date
-
parseISODate
try to find out suitable date given [YY[YY]]MMDDhhmmss format
(difficult thing being finding out appropiate year)- Parameters:
d- date formated as [YY[YY]]MMDDhhmmss, typical field 13 + field 12timeZone- for GMT for example, use TimeZone.getTimeZone("GMT") and for Uruguay use TimeZone.getTimeZone("GMT-03:00")- Returns:
- Date
-
parseISODate
try to find out suitable date given [YY[YY]]MMDDhhmmss format
(difficult thing being finding out appropiate year)- Parameters:
d- date formated as [YY[YY]]MMDDhhmmss, typical field 13 + field 12currentTime- currentTime in millis- Returns:
- Date
-
parseISODate
try to find out suitable date given [YY[YY]]MMDDhhmmss format
(difficult thing being finding out appropiate year)- Parameters:
d- date formated as [YY[YY]]MMDDhhmmss, typical field 13 + field 12currentTime- currentTime in millistimeZone- for GMT for example, use TimeZone.getTimeZone("GMT") and for Uruguay use TimeZone.getTimeZone("GMT-03:00")- Returns:
- Date
-
getDateTime
- Returns:
- date in MMddHHmmss format suitable for FIeld 7
-
getDateTime
- Parameters:
d- date object to be formattedtimeZone- for GMT for example, use TimeZone.getTimeZone("GMT") and for Uruguay use TimeZone.getTimeZone("GMT-03:00")- Returns:
- date in MMddHHmmss format suitable for FIeld 7
-
getTime
-
getTime
-
getDate
-
getDate
-
getANSIDate
- Returns:
- date in yyMMdd format - suitable for ANSI field 8
-
getANSIDate
- Parameters:
d- date object to be formattedtimeZone- for GMT for example, use TimeZone.getTimeZone("GMT") and for Uruguay use TimeZone.getTimeZone("GMT-03:00")- Returns:
- date in yyMMdd format - suitable for ANSI field 8
-
getEuropeanDate
-
getEuropeanDate
-
getExpirationDate
- Returns:
- date in yyMM format - suitable for field 14
-
getExpirationDate
- Parameters:
d- date object to be formattedtimeZone- for GMT for example, use TimeZone.getTimeZone("GMT") and for Uruguay use TimeZone.getTimeZone("GMT-03:00")- Returns:
- date in yyMM format - suitable for field 14
-
getJulianDate
- Parameters:
d- date object to be formatted- Returns:
- date in YDDD format suitable for bit 31 or 37 depending on interchange
-
getJulianDate
- Parameters:
d- date object to be formattedtimeZone- for GMT for example, use TimeZone.getTimeZone("GMT") and for Uruguay use TimeZone.getTimeZone("GMT-03:00")- Returns:
- date in YDDD format suitable for bit 31 or 37 depending on interchange
-
formatDuration
-