Java tutorial
//package com.java2s; //License from project: Open Source License import android.text.format.DateUtils; public class Main { /** * Twitter human friendly date. * * @return the string */ public static CharSequence humanFriendlyDate(Long created) { return DateUtils.getRelativeTimeSpanString(created, System.currentTimeMillis(), DateUtils.MINUTE_IN_MILLIS, DateUtils.FORMAT_ABBREV_RELATIVE); } }