ghDateRangeLabel function
Transform the date range enum into proper label. Can be used for UI.
Implementation
String ghDateRangeLabel(GhTrendDateRange from) {
switch (from) {
case GhTrendDateRange.today:
return 'Today';
case GhTrendDateRange.thisWeek:
return 'This week';
case GhTrendDateRange.thisMonth:
return 'This month';
}
}