public class DateSorter extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DAY_COUNT
must be >= 3
|
Constructor and Description |
---|
DateSorter(Context context) |
Modifier and Type | Method and Description |
---|---|
long |
getBoundary(int index) |
int |
getIndex(long time) |
String |
getLabel(int index) |
public static final int DAY_COUNT
public DateSorter(Context context)
context
- Application contextpublic int getIndex(long time)
time
- time since the Epoch in milliseconds, such as that
returned by Calendar.getTimeInMillis()public String getLabel(int index)
index
- date bin index as returned by getIndex()public long getBoundary(int index)
index
- date bin index as returned by getIndex()