@Test public void invalidStringElementsAreIgnored() { Assert.assertEquals("1995", new PhenoTipsDate("1995-27-72").toYYYYMMDDString()); }
public String toYYYYMMDDString() { if (this.year == null) { return ""; } String result = this.year.toString(); if (this.rangeYears != null && this.rangeYears > 1) { result += "s"; } if (this.month != null) { result = result + "-" + (this.month < 10 ? "0" : "") + this.month.toString(); } if (this.day != null) { result = result + "-" + (this.day < 10 ? "0" : "") + this.day.toString(); } return result; }
PhenoTipsDate { public String toYYYYMMDDString() { if (this.year == null) { return ""; } String result = this.year.toString(); if (this.rangeYears != null && this.rangeYears > 1) { result += "s"; } if (this.month != null) { result = result + "-" + (this.month < 10 ? "0" : "") + this.month.toString(); } if (this.day != null) { result = result + "-" + (this.day < 10 ? "0" : "") + this.day.toString(); } return result; } }
PhenoTipsDate { public String toYYYYMMDDString() { if (this.year == null) { return ""; } String result = this.year.toString(); if (this.rangeYears != null && this.rangeYears > 1) { result += "s"; } if (this.month != null) { result = result + "-" + (this.month < 10 ? "0" : "") + this.month.toString(); } if (this.day != null) { result = result + "-" + (this.day < 10 ? "0" : "") + this.day.toString(); } return result; } PhenoTipsDate(Date date);  PhenoTipsDate(JSONObject jsonFuzzyDate);  PhenoTipsDate(String phenoTipsDateString); }
PhenoTipsDate { public String toYYYYMMDDString() { if (this.year == null) { return ""; } String result = this.year.toString(); if (this.rangeYears != null && this.rangeYears > 1) { result += "s"; } if (this.month != null) { result = result + "-" + (this.month < 10 ? "0" : "") + this.month.toString(); } if (this.day != null) { result = result + "-" + (this.day < 10 ? "0" : "") + this.day.toString(); } return result; } PhenoTipsDate(Date date);  PhenoTipsDate(JSONObject jsonFuzzyDate);  PhenoTipsDate(String phenoTipsDateString); JSONObject toJSON(); Date toEarliestPossibleISODate(); @Override String toString(); String toYYYYMMDDString(); boolean isSet(); }
PhenoTipsDate { public String toYYYYMMDDString() { if (this.year == null) { return ""; } String result = this.year.toString(); if (this.rangeYears != null && this.rangeYears > 1) { result += "s"; } if (this.month != null) { result = result + "-" + (this.month < 10 ? "0" : "") + this.month.toString(); } if (this.day != null) { result = result + "-" + (this.day < 10 ? "0" : "") + this.day.toString(); } return result; } PhenoTipsDate(Date date);  PhenoTipsDate(JSONObject jsonFuzzyDate);  PhenoTipsDate(String phenoTipsDateString); JSONObject toJSON(); Date toEarliestPossibleISODate(); @Override String toString(); String toYYYYMMDDString(); boolean isSet(); static final String JSON_YEAR_FIELDNAME; static final String JSON_MONTH_FIELDNAME; static final String JSON_DAY_FIELDNAME; static final String JSON_RANGE_FIELDNAME; static final String JSON_RANGE_YEARS; static final Pattern DATE_STRING_REGEXP; }