Forum

date is wrong is re...
 
Notifications
Clear all

date is wrong is real work allocation

4 Posts
2 Users
0 Reactions
4,121 Views
(@selina)
Posts: 16
Active Member
Topic starter
 
[#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.


 
Posted : 30 Dec 2013 3H57
(@babynus)
Posts: 14952
Member 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 😉


 
Posted : 30 Dec 2013 12H17
(@selina)
Posts: 16
Active Member
Topic starter
 

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:


 
Posted : 02 Jan 2014 3H47
(@babynus)
Posts: 14952
Member Admin
 

Hi,

I fixed the issue yesterday,

 strftime("%Y")>10 

must be replaced with

strftime("%m")>10

code below is updated.


 
Posted : 02 Jan 2014 12H00
Share:

Scroll to Top