This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watch -n 60 "curl -s https://play.google.com/store/devices?hl=en | tr '<' '\n' | tr '\240' ' ' | grep 'cover-image' | grep -oE 'alt=\"[^\"]+\"' | cut -c6\- | sed -e 's/.$//' | sort" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static String getDeltaDateText(Context context, Calendar date) { | |
final String formattedDate; | |
if (date != null && date.getTimeInMillis() > 10000) { | |
long delta = (new GregorianCalendar().getTimeInMillis() - date.getTimeInMillis()) / 1000; | |
if (delta < 60) { | |
formattedDate = context.getString(R.string.time_delay_moments); | |
} else if (delta < 3600) { | |
formattedDate = MessageFormat.format(context.getString(R.string.time_delay_minutes), (int) (delta / 60)); | |
} else if (delta < 3600 * 24) { | |
formattedDate = MessageFormat.format(context.getString(R.string.time_delay_hours), (int) (delta / 3600)); |
NewerOlder