@Override public NSDate clone() { return new NSDate((Date)this.getDate().clone()); }
/** * Attempts to parse a plain string as a date if possible. * * @return A NSDate if the string represents such an object. Otherwise a NSString is returned. */ private NSObject parseDateString() { String numericalString = this.parseString(); if (numericalString.length() > 4 && numericalString.charAt(4) == DATE_DATE_FIELD_DELIMITER) { try { return new NSDate(numericalString); } catch(Exception ex) { //An exception occurs if the string is not a date but just a string } } return new NSString(numericalString); }
return new NSData(getNodeTextContents(n)); } else if (type.equals("date")) { return new NSDate(getNodeTextContents(n));
return new NSDate((Date) object);
return new NSDate(quotedString); } catch (Exception ex) {
obj = new NSDate(dateString); } else if (this.accept(DATA_GSINT_BEGIN_TOKEN, DATA_GSREAL_BEGIN_TOKEN)) {
throw new PropertyListFormatException("The given binary property list contains a date object of an unknown type ("+objInfo+")"); return new NSDate(this.bytes, offset + 1, offset + 9);