dallasgutauckis/parcelabler

Date type support

Closed this issue · 3 comments

You can easily support Date fields too:

dest.writeLong(dateValue.getTime());
dateValue = new Date(parcel.readLong());

thanks for this superb tool !

Added. The implementation will null-check to avoid crashing if dateValue is null. Implementation works bidirectionally with that null-check.

checked. superb ! thanks for the quick work !

Hi there, I love your tool. I noticed that a null Date is being written to Parcel as -1L, which technically is a valid time (however rare this may be). Long.MIN_VALUE would probably make more sense.