/** * Constructs a DateTime from a String. The String is expected to be in W3C * Schema DateTime format. * * @param date * the string representing the date * @throws java.text.ParseException * if we are passed an illegal value */ public DateTime(String date) throws java.text.ParseException { parseDateTimeInternal(date, this); }
/** * Constructs a DateTime from a String. The String is expected to be in W3C Schema DateTime * format. * * @param date the string representing the date * @throws java.text.ParseException if we are passed an illegal value */ public DateTime(String date) throws java.text.ParseException { parseDateTimeInternal(date, this); }
/** * Parses a String into a new DateTime instance. * * @param str * the string to parse * @return a new DateTime instance with the value of the parsed string. * @throws ParseException * If the string to parse does not follow the right format */ public static DateTime parseDateTime(String str) throws ParseException { return parseDateTimeInternal(str, new DateTime()); }
/** * Parses a String into a new DateTime instance. * * @param str the string to parse * @return a new DateTime instance with the value of the parsed string. * @throws ParseException If the string to parse does not follow the right format */ public static DateTime parseDateTime(String str) throws ParseException { return parseDateTimeInternal(str, new DateTime()); }