Forum

date is wrong is re...
 
Notifications
Retirer tout

date is wrong is real work allocation

4 Posts
2 Utilisateurs
0 Reactions
4,120 Vu
(@selina)
Posts: 16
Active Member
Début du sujet
 
[#1537]

Hi,

Just found that the date is wrong for real work allocation.
The date is 2013/12/30, but the week range is 12/31/2012 - 01/06/2013
I have to manually switch to 2014 week 1 🙁

Please help.
Thanks a lot.


 
Posté : 30 Déc AM 03:1212
(@babynus)
Posts: 14952
Membre Admin
 

Hi,

Yes, in this end of year, there is an issue in the week and year calculation.
It sets today as week 1 of year 2013.

Hint : just change year with the year spinner to set it to 2014, keeping week to 1.
Avoid using day selector or select January 1st of 2014.

Here is the fix :

In /view/imputationList.php, replace line 12

$currentYear=strftime("%Y") ;

with

$currentYear=strftime("%Y") ;
if ($currentWeek==1 and strftime("%m")>10) {
	$currentYear+=1;
}

In /view/js/projeqtorWork.js, replace line 94

var week=getWeek(directDate.getDate(),directDate.getMonth()+1,directDate.getFullYear())+'';

with

var week=getWeek(directDate.getDate(),directDate.getMonth()+1,directDate.getFullYear())+'';
		if (week==1 && directDate.getMonth()>10) {
		  year+=1;
		}

Don't forget to clean browser cache before testing 😉


 
Posté : 30 Déc PM 12:1212
(@selina)
Posts: 16
Active Member
Début du sujet
 

Hi,

Happy new year...
I applied the codes you provided but the date is still wrong because today (2014/1/1) I clicked the link, it is changed to year 2015 week 1. :dry:


 
Posté : 2 Jan AM 03:011
(@babynus)
Posts: 14952
Membre Admin
 

Hi,

I fixed the issue yesterday,

 strftime("%Y")>10 

must be replaced with

strftime("%m")>10

code below is updated.


 
Posté : 2 Jan PM 12:011
Share:
Retour en haut