def METHOD_NAME(date, inPast=False):
	dateLocal = localtime(date)
	now = time()
	nowLocal = localtime(now)
	if dateLocal[:3] == nowLocal[:3]:  # Time is the same day.
		formattedDate = _("Today")
	elif dateLocal[0] == nowLocal[0] and dateLocal[7] == nowLocal[7] - 1 and inPast:  # Time is the previous day. (Doesn't work on New Year's day!)
		formattedDate = _("Yesterday")
	elif ((date - now) < 7 * 86400) and (now < date) and not inPast:  # Time is in the same week (must be in the future).
		formattedDate = strftime("%a", dateLocal)
	elif dateLocal[0] == nowLocal[0]:  # Time is in the same year.
		if inPast:  # The day is wanted in MediaList.
			formattedDate = strftime(config.usage.date.dayshort.value, dateLocal)
		else:
			formattedDate = strftime(config.usage.date.short.value, dateLocal)
	else:
		formattedDate = strftime(config.usage.date.long.value, dateLocal)
	timeLocal = strftime(config.usage.time.short.value, dateLocal)
	return formattedDate, timeLocal