@Test public void testRelative_withAbbreviated() { final Context context = context(); final KSString ksString = ksString(); final DateTime dateTime = DateTime.parse("2015-12-17T18:35:05Z"); final RelativeDateTimeOptions.Builder builder = RelativeDateTimeOptions.builder().abbreviated(true); assertEquals("4 hrs ago", DateTimeUtils.relative(context, ksString, dateTime, builder.relativeToDateTime(DateTime.parse("2015-12-17T22:35:05Z")).build())); assertEquals("in 4 hrs", DateTimeUtils.relative(context, ksString, dateTime, builder.relativeToDateTime(DateTime.parse("2015-12-17T14:35:05Z")).build())); }
public static @NonNull String relative(final @NonNull Context context, final @NonNull KSString ksString, final @NonNull DateTime dateTime) { return relative(context, ksString, dateTime, RelativeDateTimeOptions.builder().build()); }
DateTimeUtils { public static @NonNull String relative(final @NonNull Context context, final @NonNull KSString ksString, final @NonNull DateTime dateTime) { return relative(context, ksString, dateTime, RelativeDateTimeOptions.builder().build()); } }
DateTimeUtils { public static @NonNull String relative(final @NonNull Context context, final @NonNull KSString ksString, final @NonNull DateTime dateTime) { return relative(context, ksString, dateTime, RelativeDateTimeOptions.builder().build()); } private  DateTimeUtils(); }
DateTimeUtils { public static @NonNull String relative(final @NonNull Context context, final @NonNull KSString ksString, final @NonNull DateTime dateTime) { return relative(context, ksString, dateTime, RelativeDateTimeOptions.builder().build()); } private  DateTimeUtils(); static @NonNull String estimatedDeliveryOn(final @NonNull DateTime dateTime); static @NonNull String estimatedDeliveryOn(final @NonNull DateTime dateTime, final @NonNull Locale locale); static boolean isDateToday(final @NonNull DateTime dateTime); static boolean isEpoch(final @NonNull DateTime dateTime); static @NonNull String fullDate(final @NonNull DateTime dateTime); static @NonNull String fullDate(final @NonNull DateTime dateTime, final @NonNull Locale locale); static @NonNull String longDate(final @NonNull DateTime dateTime); static @NonNull String longDate(final @NonNull DateTime dateTime, final @NonNull Locale locale); static @NonNull String mediumDate(final @NonNull DateTime dateTime); static @NonNull String mediumDate(final @NonNull DateTime dateTime, final @NonNull Locale locale); static @NonNull String mediumDateShortTime(final @NonNull DateTime dateTime); static @NonNull String mediumDateShortTime(final @NonNull DateTime dateTime, final @NonNull DateTimeZone dateTimeZone); static @NonNull String mediumDateShortTime(final @NonNull DateTime dateTime, final @NonNull DateTimeZone dateTimeZone,
    final @NonNull Locale locale); static @NonNull String mediumDateTime(final @NonNull DateTime dateTime); static @NonNull String mediumDateTime(final @NonNull DateTime dateTime, final @NonNull DateTimeZone dateTimeZone); static @NonNull String mediumDateTime(final @NonNull DateTime dateTime, final @NonNull DateTimeZone dateTimeZone,
    final @NonNull Locale locale); static @NonNull String relative(final @NonNull Context context, final @NonNull KSString ksString,
    final @NonNull DateTime dateTime); static @NonNull String relative(final @NonNull Context context, final @NonNull KSString ksString,
    final @NonNull DateTime dateTime, final @NonNull RelativeDateTimeOptions options); static @NonNull String shortTime(final @NonNull DateTime dateTime); static @NonNull String shortTime(final @NonNull DateTime dateTime, final @NonNull Locale locale); }
DateTimeUtils { public static @NonNull String relative(final @NonNull Context context, final @NonNull KSString ksString, final @NonNull DateTime dateTime) { return relative(context, ksString, dateTime, RelativeDateTimeOptions.builder().build()); } private  DateTimeUtils(); static @NonNull String estimatedDeliveryOn(final @NonNull DateTime dateTime); static @NonNull String estimatedDeliveryOn(final @NonNull DateTime dateTime, final @NonNull Locale locale); static boolean isDateToday(final @NonNull DateTime dateTime); static boolean isEpoch(final @NonNull DateTime dateTime); static @NonNull String fullDate(final @NonNull DateTime dateTime); static @NonNull String fullDate(final @NonNull DateTime dateTime, final @NonNull Locale locale); static @NonNull String longDate(final @NonNull DateTime dateTime); static @NonNull String longDate(final @NonNull DateTime dateTime, final @NonNull Locale locale); static @NonNull String mediumDate(final @NonNull DateTime dateTime); static @NonNull String mediumDate(final @NonNull DateTime dateTime, final @NonNull Locale locale); static @NonNull String mediumDateShortTime(final @NonNull DateTime dateTime); static @NonNull String mediumDateShortTime(final @NonNull DateTime dateTime, final @NonNull DateTimeZone dateTimeZone); static @NonNull String mediumDateShortTime(final @NonNull DateTime dateTime, final @NonNull DateTimeZone dateTimeZone,
    final @NonNull Locale locale); static @NonNull String mediumDateTime(final @NonNull DateTime dateTime); static @NonNull String mediumDateTime(final @NonNull DateTime dateTime, final @NonNull DateTimeZone dateTimeZone); static @NonNull String mediumDateTime(final @NonNull DateTime dateTime, final @NonNull DateTimeZone dateTimeZone,
    final @NonNull Locale locale); static @NonNull String relative(final @NonNull Context context, final @NonNull KSString ksString,
    final @NonNull DateTime dateTime); static @NonNull String relative(final @NonNull Context context, final @NonNull KSString ksString,
    final @NonNull DateTime dateTime, final @NonNull RelativeDateTimeOptions options); static @NonNull String shortTime(final @NonNull DateTime dateTime); static @NonNull String shortTime(final @NonNull DateTime dateTime, final @NonNull Locale locale);  }