@Test public void testShortDateConstruction() throws Exception { SimpleDate sd = mConstructor.newInstance(mShortFormat.parse(SHORT_DATE_0)); assertNotNull(sd); final Calendar calendar = Calendar.getInstance(); calendar.setTime(sd.getDate()); assertEquals(calendar.get(Calendar.YEAR), 2013); assertEquals(calendar.get(Calendar.MONTH), Calendar.JULY); assertEquals(calendar.get(Calendar.DAY_OF_MONTH), 18); sd = mConstructor.newInstance(mShortFormat.parse(SHORT_DATE_1)); assertNotNull(sd); calendar.setTime(sd.getDate()); assertEquals(calendar.get(Calendar.YEAR), 2016); assertEquals(calendar.get(Calendar.MONTH), Calendar.MARCH); assertEquals(calendar.get(Calendar.DAY_OF_MONTH), 4); }
public Date getDate() { return mDate; }
SimpleDate implements Parcelable { public Date getDate() { return mDate; } }
SimpleDate implements Parcelable { public Date getDate() { return mDate; } SimpleDate(final long time); private  SimpleDate(final Date date); }
SimpleDate implements Parcelable { public Date getDate() { return mDate; } SimpleDate(final long time); private  SimpleDate(final Date date); @Override boolean equals(final Object o); Date getDate(); CharSequence getRelativeDateTimeText(final Context context); CharSequence getRelativeTimeText(final Context context); @Override int hashCode(); boolean isInTheFuture(); @Override String toString(); @Override int describeContents(); @Override void writeToParcel(final Parcel dest, final int flags); }
SimpleDate implements Parcelable { public Date getDate() { return mDate; } SimpleDate(final long time); private  SimpleDate(final Date date); @Override boolean equals(final Object o); Date getDate(); CharSequence getRelativeDateTimeText(final Context context); CharSequence getRelativeTimeText(final Context context); @Override int hashCode(); boolean isInTheFuture(); @Override String toString(); @Override int describeContents(); @Override void writeToParcel(final Parcel dest, final int flags); static final Creator<SimpleDate> CREATOR; static final Comparator<SimpleDate> CHRONOLOGICAL_ORDER; static final Comparator<SimpleDate> REVERSE_CHRONOLOGICAL_ORDER; static final JsonDeserializer<SimpleDate> JSON_DESERIALIZER; static final JsonSerializer<SimpleDate> JSON_SERIALIZER; }