Class: Git::Heatmap::Weekly

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



92
93
94
# File 'lib/git/heatmap/period.rb', line 92

def key(t, p = 0)
	(mktime(t.year, t.month, t.day) - (t.wday * 3600 * 24)) + (3600 * 24 * 7 * p)
end

#nameObject



88
89
90
# File 'lib/git/heatmap/period.rb', line 88

def name
	"Weeks"
end