docs: public static CharSequence getRelativeDateTimeString(Context context, ReadableInstant time,
                                                           ReadablePeriod transitionResolution, int flags) {
          Resources r = context.getResources();
  
          // We set the millis to 0 so we aren't off by a fraction of a second when counting duration
          DateTime now = DateTime.now(time.getZone()).withMillisOfSecond(0);
          DateTime timeDt = new DateTime(time).withMillisOfSecond(0);
          boolean past = !now.isBefore(timeDt);
          Duration duration = past ? new Duration(timeDt, now) : new Duration(now, timeDt);
  
          // getRelativeTimeSpanString() doesn't correctly format relative dates
          // above a week or exact dates below a day, so clamp
          // transitionResolution as needed.
          Duration transitionDuration;
          Duration minDuration = Days.ONE.toPeriod().toDurationTo(timeDt);
          if (transitionResolution == null) {
              transitionDuration = minDuration;
          }
          else {
              transitionDuration = past ? transitionResolution.toPeriod().toDurationTo(now) :
                  transitionResolution.toPeriod().toDurationFrom(now);
              Duration maxDuration = Weeks.ONE.toPeriod().toDurationTo(timeDt);
              if (transitionDuration.isLongerThan(maxDuration)) {
                  transitionDuration = maxDuration;
              }
              else if (transitionDuration.isShorterThan(minDuration)) {
                  transitionDuration = minDuration;
              }
          }
  
          CharSequence timeClause = formatDateRange(context, time, time, FORMAT_SHOW_TIME);
  
          String result;
          if (!duration.isLongerThan(transitionDuration)) {
              CharSequence relativeClause = getRelativeTimeSpanString(context, time, flags);
              result = r.getString(R.string.joda_time_android_relative_time, relativeClause, timeClause);
          }
          else {
              CharSequence dateClause = getRelativeTimeSpanString(context, time, false);
              result = r.getString(R.string.joda_time_android_date_time, dateClause, timeClause);
          }
  
          return result;
      }