airedSection
fun airedSection(title: String, transform: (from: Calendar, to: Calendar?) -> String = { from, to ->
val format = SimpleDateFormat("MMMM d, yyyy")
val builder = StringBuilder().apply {
append(format.format(from.time))
if (to != null) {
append(" to ${format.format(to.time)}")
}
}
builder.toString()
}): ExtraSection
Creates an ExtraSection with a simple TextData using the response from transform, by default the date is formatted like MMMM d, yyyy
.
When is no longer airing:
{from} to {to}
Content copied to clipboard
When is airing:
{from}
Content copied to clipboard
Return
An ExtraSection using the title
Parameters
title
Section title
transform
Optional function for custom format