}
return time.format(context.getResources().getString(R.string.month_year));
}
<<<<<<< HEAD
=======
// TODO: replace this with the correct i18n way to do this
public static final String englishNthDay[] = {
"", "1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th",
"10th", "11th", "12th", "13th", "14th", "15th", "16th", "17th", "18th", "19th",
"20th", "21st", "22nd", "23rd", "24th", "25th", "26th", "27th", "28th", "29th",
"30th", "31st"
};
public static String formatNth(int nth) {
return "the " + englishNthDay[nth];
}
/**
* Returns a list joined together by the provided delimiter, for example,
* ["a", "b", "c"] could be joined into "a,b,c"
*
* @param things the things to join together
* @param delim the delimiter to use
* @return a string contained the things joined together
*/
public static String join(List> things, String delim) {
StringBuilder builder = new StringBuilder();
boolean first = true;
for (Object thing : things) {
if (first) {
first = false;
} else {
builder.append(delim);
}
builder.append(thing.toString());
return builder.toString();
}
/**
* Sets the time to the beginning of the day (midnight) by clearing the
* hour, minute, and second fields.
*/
static void setTimeToStartOfDay(Time time) {
time.second = 0;
time.minute = 0;
time.hour = 0;
}
>>>>>>> b66b5805813cc21d3b267ca6570287de3ab5b237
/**
* Get first day of week as android.text.format.Time constant.
* @return the first day of week in android.text.format.Time |