You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to propose an addition to the AddDate() function documentation to clarify the impact of the order of operations and normalization on the result.
Could you please include the following addition in the documentation for better clarity?
Additionally, it is important to note that while AddDate(1, 1, 1) applied to January 31, 2023, results in March 3, 2024, applying the same period increment in three separate steps—AddDate(0, 0, 1), AddDate(0, 1, 0), and AddDate(1, 0, 0)—results in March 1, 2024. Moreover, if the order of these three operations is changed, such as AddDate(0, 1, 0), AddDate(0, 0, 1), and AddDate(1, 0, 0), the result will be March 4, 2024. This illustrates that the order of operations can affect the outcome due to the normalization process.
I believe this addition will help users better understand the behavior of the AddDate() function.
Thank you for considering this suggestion.
The text was updated successfully, but these errors were encountered:
Thank you for your response. I understand that detailed examples may not fit well in the main documentation. However, I believe a note in the doc comments or source comments could help users avoid unintended issues when refactoring multiple AddDate() calls into one, due to the normalization process. I appreciate your consideration of this suggestion.
Proposal Details
Hello Go Team,
I would like to propose an addition to the
AddDate()
function documentation to clarify the impact of the order of operations and normalization on the result.Could you please include the following addition in the documentation for better clarity?
I believe this addition will help users better understand the behavior of the
AddDate()
function.Thank you for considering this suggestion.
The text was updated successfully, but these errors were encountered: