@NonNull
    public static String formatStoredAgo(final long updatedTimeMillis) {
        final long minutes = (System.currentTimeMillis() - updatedTimeMillis) / MINUTE_IN_MILLIS;
        final long days = minutes / MINUTES_PER_DAY;

        final String ago;
        if (updatedTimeMillis == 0L) {
            ago = "";
        } else if (minutes < 15) {
            ago = CgeoApplication.getInstance().getString(R.string.cache_offline_time_mins_few);
        } else if (minutes < 60) {
            ago = CgeoApplication.getInstance().getResources().getQuantityString(R.plurals.cache_offline_about_time_mins, (int) minutes, (int) minutes);
        } else if (days < 2) {
            ago = CgeoApplication.getInstance().getResources().getQuantityString(R.plurals.cache_offline_about_time_hours, (int) (minutes / 60), (int) (minutes / 60));
        } else if (days < DAYS_PER_MONTH) {
            ago = CgeoApplication.getInstance().getResources().getQuantityString(R.plurals.cache_offline_about_time_days, (int) days, (int) days);
        } else if (days < 365) {
            ago = CgeoApplication.getInstance().getResources().getQuantityString(R.plurals.cache_offline_about_time_months, (int) (days / DAYS_PER_MONTH), (int) (days / DAYS_PER_MONTH));
        } else {
            ago = CgeoApplication.getInstance().getString(R.string.cache_offline_about_time_year);
        }

        return String.format(CgeoApplication.getInstance().getString(R.string.cache_offline_stored_ago), ago);
    }
Generate a numeric date and time string according to system-wide settings (locale,
date format) such as "7 september at 12:35".

@param date milliseconds since the epoch
@return the formatted string
main/src/main/java/cgeo/geocaching/utils/Formatter.java