If the task ends the day, how do I change the duration to 1

Now I need to add the duration to 0 plus 1, or add all the duration to 1.

Do you want to make the duration inclusive?
Gantt stores the end_date in a non-inclusive format. Unfortunately, there is no way to change it. But you can change what is displayed in the grid and the lightbox by changing the end_date template.
That functionality was added in the 6.3.0 version:
Here is the snippet that demonstrates how it works:

If the task schedule is set by start_date and end_date, can the duration of tasks with the same start date and end_date be 1?

You can change what is displayed in Gantt, but there is no way to change how Gantt stores the data.
So, you can have the same date for the start_date and end_date parameters in the grid and the lightbox, and the duration will be 1 day:

But you cannot have the same date in those values to have 1-day duration:

1 Like

Ok, got it. Thanks for your answer.