solawi-rhein-neckar / solawibestellsystem

2 stars 0 forks source link

Current Week is CW-20-2020 #21

Closed CzernyJ closed 4 years ago

CzernyJ commented 4 years ago

There seems to be a bug when determining the current CW. On 04.01.2020 the current week is deemed to be 20-2020.

This disables the possibility to make changes on weeks <20-2020

regenduft commented 4 years ago

I hotfixed it.

SolawiBestellsystem.js

new code will prefix a zero for week numbers < 10

pub.week = pub.date.getWeekYear() + (pub.date.getWeek() >
(pub.date.getDay() == 0 || pub.date.getDay() > pub.day ? 8 : 9 ) ?
"." : ".0") +  (pub.date.getDay() == 0 || pub.date.getDay() >
pub.day ? pub.date.getWeek() + 1 : pub.date.getWeek());

Am Sat, 04 Jan 2020 08:14:30 -0800 schrieb Jürgen Czerny notifications@github.com:

There seems to be a bug when determining the current CW. On 04.01.2020 the current week is deemed to be 20-2020.

This disables the possibility to make changes on weeks <20-2020