Contributor Guidelines
Descrcibe the bug?
In src/common/utils/commonUtils.js, the formatDate function calls Date(year, month, day)
without the new keyword. Without new, JavaScript's Date() ignores all arguments and
returns the current date as a string. This means every user's join month shows the current
month instead of their actual join month.
Steps to reproduce the bug?
- Call formatDate('2023-01-15T00:00:00')
- The returned string shows current month instead of "Jan"
Expected behavior
formatDate('2023-01-15T00:00:00') should return "Joined 15 Jan 2023"
but instead returns the current month name every time.
Desktop (Please provide your system information)
- OS: Windows
- Browser: Chrome
- Version: Not applicable (this is a code bug, not a visual/browser issue)
Mobile (Please provide your device information)
No response
Screenshot / Screenshare
No response
Relevant log output
No response
Record
Code of Conduct
Contributor Guidelines
Descrcibe the bug?
In src/common/utils/commonUtils.js, the formatDate function calls Date(year, month, day)
without the
newkeyword. Withoutnew, JavaScript's Date() ignores all arguments andreturns the current date as a string. This means every user's join month shows the current
month instead of their actual join month.
Steps to reproduce the bug?
Expected behavior
formatDate('2023-01-15T00:00:00') should return "Joined 15 Jan 2023"
but instead returns the current month name every time.
Desktop (Please provide your system information)
Mobile (Please provide your device information)
No response
Screenshot / Screenshare
No response
Relevant log output
No response
Record
Code of Conduct