/** * This constructor replace the constructor with further DateTime object which will be included * in the futur version of jdk (jdk7). example of datetime argument: format specified by the * ISO8601 yyyy-mm-DDTHH:MM:SSZ - example : 2003-02-13T12:28:00.000GMT-08:00. * * @param dateTime * @throws java.text.ParseException */ public DefaultPosition(final InternationalString datetime) throws ParseException { this.position = Utils.getDateFromString(datetime.toString()); }
/** * This constructor replace the constructor with further DateTime object which will be included in the futur version of jdk (jdk7). * example of datetime argument: format specified by the ISO8601 yyyy-mm-DDTHH:MM:SSZ - example : 2003-02-13T12:28:00.000GMT-08:00. * @param dateTime * @throws java.text.ParseException */ public DefaultPosition(final InternationalString datetime) throws ParseException { this.position = Utils.getDateFromString(datetime.toString()); }
/** * This constructor replace the constructor with further DateTime object which will be included in the futur version of jdk (jdk7). * example of datetime argument: format specified by the ISO8601 yyyy-mm-DDTHH:MM:SSZ - example : 2003-02-13T12:28:00.000GMT-08:00. * @param dateTime * @throws java.text.ParseException */ public DefaultPosition(final InternationalString datetime) throws ParseException { this.position = Utils.getDateFromString(datetime.toString()); }
/** * Gets the zoned date time. * * @param dateString the date string * @return the zoned date time */ public static ZonedDateTime getZonedDateTime(String dateString) { ZonedDateTime zonedDateTime = null; if (dateString != null) { try { String updatedString = dateString.replace("Z", "+00:00"); Date iso8601 = Utils.getDateFromString(updatedString); if (iso8601 != null) { String zoneId = Utils.getTimeZone(updatedString); zonedDateTime = ZonedDateTime.ofInstant(iso8601.toInstant(), ZoneId.of(zoneId)); } } catch (ParseException e) { ConsoleManager.getInstance().exception(DateUtils.class, e); } } return zonedDateTime; }