I need some help with some logic regarding week calculation.
I have an attribute Task. Task has it's duration (number of weeks in format 201239).
And I have a metric that returns id of current week (today's date -7).
I need ti calculate remaining weeks till the end of the task.
It all works great until we enter next year.
example: Task week 201240 | Task duration 201338
and instead of returning 50 weeks that are left until the end of the task, it returns some wrong number.
I could really use some help regarding this.
I have an attribute Task. Task has it's duration (number of weeks in format 201239).
And I have a metric that returns id of current week (today's date -7).
I need ti calculate remaining weeks till the end of the task.
It all works great until we enter next year.
example: Task week 201240 | Task duration 201338
and instead of returning 50 weeks that are left until the end of the task, it returns some wrong number.
I could really use some help regarding this.