Date template is not accurate
Closed this issue · 19 comments
date
template in templates.xsl
is not accurate because it calculates one month as 30 days, regardless of what is the month:
<xsl:value-of select="$minute + $hour * 60 + $day * 60 * 24 + $month * 60 * 24 * 30 + $year * 60 * 24 * 365"/>
it produces incorrect values in agenda: https://github.com/zerocracy/farm/issues/683
To reproduce it just change added
values in agenda/simple
to:
<added>2018-02-27T12:00:00.684Z</added>
and today
param in templates.xsl
to:
<xsl:param name="today" select="'2018-03-01T12:00:00Z'"/>
and run rake
to generate agenda.html
. It will be 4 days in agenda.html
: 30+30+1 - (30+27) == 4
, but actually it is 2 days: 30+28+1 - (30+27) == 2
.
@0crat refuse
@proshin-roman The user @proshin-roman/z resigned from #336, please stop working. Reason for job resignation: Order was cancelled
Tasks refusal is discouraged, see §6: -15 point(s) just awarded to @proshin-roman/z
@paulodamaso The impediment for #336 was registered successfully by @paulodamaso/z
@g4s8 Merged, please close.
@paulodamaso thanks
@ypshenychka/z please review this job completed by @paulodamaso/z, as in §30; the job will be fully closed and all payments will be made when the quality review is completed
@0crat quality good
Order was finished, quality is "good": +35 point(s) just awarded to @paulodamaso/z
Quality review completed: +8 point(s) just awarded to @ypshenychka/z