Skip to content

Conversation

@lavdboomImpress
Copy link

Also see issue #576. This PR replaces the modular division by 30 from the start of the chart and the start of the task by a fractal division of the day of the task and 31.

@safwansamsudeen
Copy link
Collaborator

@lavdboomImpress how is this better? You're just replacing 30 by 31.

@lavdboomImpress
Copy link
Author

Thanks for your reply. I have given an example of the problem in issue #576, but I'll provide a brief overview here.

My change does a bit more than that. I calculate the fraction with the day of the month with just the start date of the task. The original code calculates it with the number of days from the start of the chart to the start of the task. For example:

Start of chart = 1 May 2025
Start of task = 29 September 2025
Diff in days = 152

With the original code it places the start of the task at the beginning of September, because 152%30 = 2, which leads to a fraction of 0.067 (2/30). My code simply does 29/31=0.94, which more accurately places the start of the task at the end of September.

I hope this makes it clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants