Class: Git::Heatmap::Quarterly

Inherits:
Period
  • Object
show all
Defined in:
lib/git/heatmap/period.rb

Instance Method Summary collapse

Methods inherited from Period

#aggregate, #between, #mktime

Instance Method Details

#key(t, p = 0) ⇒ Object



116
117
118
119
120
121
122
# File 'lib/git/heatmap/period.rb', line 116

def key(t, p = 0)
	quater = (t.month - 1) / 3
	month = (quater + p) * 3
	year = month / 12

	mktime(t.year + year, (month % 12) + 1)
end

#nameObject



112
113
114
# File 'lib/git/heatmap/period.rb', line 112

def name
	"Quarters"
end