@Test public void testExtendedDateConstruction() throws Exception { String dateString = (String) mFixTimeZone.invoke(null, EXTENDED_DATE_0); SimpleDate sd = mConstructor.newInstance(mExtendedFormat.parse(dateString)); assertNotNull(sd); final Calendar calendar = Calendar.getInstance(); calendar.setTime(sd.getDate()); assertEquals(calendar.get(Calendar.YEAR), 2013); assertEquals(calendar.get(Calendar.MONTH), Calendar.FEBRUARY); assertEquals(calendar.get(Calendar.DAY_OF_MONTH), 20); dateString = (String) mFixTimeZone.invoke(null, EXTENDED_DATE_1); sd = mConstructor.newInstance(mExtendedFormat.parse(dateString)); assertNotNull(sd); calendar.setTime(sd.getDate()); assertEquals(calendar.get(Calendar.YEAR), 2015); assertEquals(calendar.get(Calendar.MONTH), Calendar.AUGUST); assertEquals(calendar.get(Calendar.DAY_OF_MONTH), 6); }
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; }