bryanljx / pe

0 stars 0 forks source link

Behavior when parsing date does not match user guide #8

Open bryanljx opened 1 year ago

bryanljx commented 1 year ago

Issue

Running edit 1 by/may 27th is supposed to set it to 27th may of the current year, that is 2022, as stated in the user guide.

image.png

However, the actual behavior is that it sets it to the next year when running the command as seen below. This occurs for all dates for any month that has passed already.

image.png

In contrast, when running edit 1 by/nov 1 this sets the date to 01/11/2022 even though this day has already passed. The practical exam date is 11/11/2022.

image.png

This behavior is rather weird, and many users are likely to run into this as this is a rather generic format.

soc-pe-bot commented 1 year ago

Team's Response

Fixing of #4861 will resolve this issue.

The 'Original' Bug

[The team marked this bug as a duplicate of the following bug]

Datetime task formatting for dates without year

Description:

According to the User Guide, “may 27th” will format it to the 27th of May of the current year, 11.59pm.

However, when I type the command "add finish assignment by/may 27th", I expect the task deadline to be 27/05/2022 as the current year is 2022. However, it is instead 27/05/2023.

I believe this is a typo in the User Guide and your team might have miswritten and meant the coming 27th of May which will be 2023, or it might be a flaw in your code.

Screenshots:

image.png


[original: nus-cs2103-AY2223S1/pe-interim#4732] [original labels: severity.Medium type.FunctionalityBug]

Their Response to the 'Original' Bug

[This is the team's response to the above 'original' bug]

Fixing this bug involves changing the documentation of the User Guide. It is not an issue with the code.

Items for the Tester to Verify

:question: Issue duplicate status

Team chose to mark this issue as a duplicate of another issue (as explained in the Team's response above)

Reason for disagreement: [replace this with your explanation]


:question: Issue type

Team chose [type.DocumentationBug] Originally [type.FunctionalityBug]

Reason for disagreement: Rather than it being a typo / documentation bug, I feel like it's more of a bug in the implementation, hence functionality bug.

It might be just a case of a limitation of the library you were using but the behavior was inconsistent for dates that have passed in the current year.

Supposed today is 15 Nov 2022. If we run commands with date before 15 Nov, it will typically result in the date being set to next year's date. For e.g, edit 1 by/may 27th or edit 1 by/jan 27thwill result in 27 May 2023 and 27 Jan 2023. However, this only occurs for months before the current month. If we were to run edit 1 by/nov 1st instead, it will set the date to this year instead, that is 1 Nov 2022, as shown in the bug report.

Due to the inconsistency in how dates that have passed are handled (same month as the current day vs dates before the current month), I believe this to be more of a functionality bug than a documentation bug. It's quite unlikely that you were explaining / stating this behavior when describing this in the relevant parts of the user guide.