mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-19 16:50:12 +01:00
23 lines
512 B
Ruby
23 lines
512 B
Ruby
module StatsHelper
|
|
|
|
def font_size(cloud, tag)
|
|
9 + 2 * cloud.relative_size(tag)
|
|
end
|
|
|
|
def month_and_year_label(i)
|
|
t('date.month_names')[ (Time.now.mon - i -1 ) % 12 + 1 ]+ " " + (Time.now - i.months).year.to_s
|
|
end
|
|
|
|
def array_of_month_and_year_labels(count)
|
|
Array.new(count) { |i| month_and_year_label(i) }
|
|
end
|
|
|
|
def month_label(i)
|
|
t('date.month_names')[ (Time.now.mon - i -1 ) % 12 + 1 ]
|
|
end
|
|
|
|
def array_of_month_labels(count)
|
|
Array.new(count) { |i| month_label(i) }
|
|
end
|
|
|
|
end
|