Upgrade to Pro — share decks privately, control downloads, hide ads and more …

TryDateLibraryofAndroid

futabooo
January 23, 2016

 TryDateLibraryofAndroid

futabooo

January 23, 2016
Tweet

More Decks by futabooo

Other Decks in Programming

Transcript

  1. java.util.Date and java.util.Calendar ‣ The Java classes for handling dates

    ‣ Have been mostly unchanged since JDK1.0 ‣ And suffer from well-known issues ‣ for example January starts from 0 leading to many off-by-one bugs
  2. Joda-Time-Android ‣ Joda-Time for Android ‣ Joda-Time eases the pain

    and tedium of manipulating dates and time ‣ Joda-Time greatly inflates its memory footprint on apps. ‣ Avoids the problem for Android by loading from resources instead of a JAR ‣ Has extra utilities designed for Android
  3. Date4j ‣ Eases the pain and tedium of manipulating dates

    and time ‣ Different scope from Joda-Time ‣ Number of classes < 10 ‣ Works in tandem with some JDK Date classes ‣ Supports nanosecond resolutions ‣ And more
  4. ThreeTenABP ‣ An adaptation of the JSR-310 backport for Android

    ‣ JSR-310 was included in Java 8 as the java.time.* package ‣ Full replacement for the ailing Date and Calendar
  5. ·ͱΊ ‣ java.util.Date and java.util.Calendar died ‣ Joda-Time-Android fat ‣

    Date4j old ‣ ThreeTenABP cool Let’s use ThreeTenABP