How to find time is today or yesterday in android

To check if date is today, use Android utils library

DateUtils.isToday(long timeInMilliseconds)

This utils class also offers human readable strings for relative times. For example,

DateUtils.getRelativeTimeSpanString(long timeInMilliseconds) -> "42 minutes ago"

The are several parameters you can play with to define how precise the time span should be

See DateUtils

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)