  Following a theorem of David R. Hayes, we give a geometric interpretation of
the special value at $s=0$ of certain $1$-cocycle on
$\mathrm{PGL}_2(\mathbb{Q})$ previously introduced by the author. This work
yields three main results: an explicit formula for our cocycle at $s=0$, a
generalization and a new proof of Hayes' theorem, and an elegant summation
formula for the $0$th coefficient of the Ehrhart quasi-polynomial of certain
triangles in $\mathbb{R}^2$.
