-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: make the lastUpdatedDate consistent on LPR #1385
base: master
Are you sure you want to change the base?
Conversation
ceb2212
to
b6b6f5b
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1385 +/- ##
==========================================
- Coverage 85.90% 85.90% -0.01%
==========================================
Files 627 627
Lines 13705 13703 -2
Branches 2831 2867 +36
==========================================
- Hits 11773 11771 -2
Misses 1863 1863
Partials 69 69 ☔ View full report in Codecov by Sentry. |
const options = { year: 'numeric', month: 'long', day: 'numeric' }; | ||
return new Date(dateString).toLocaleDateString(undefined, options); | ||
}; | ||
const defaultDataUpdatedDate = new Date().toISOString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[question/clarification] Can you help me understand the interaction between the existing currentDate
and the added defaultDataUpdatedDate
? Is it intended to continue using currentDate
variable in various places throughout this component? Should we be using only one or the other, since they are largely both representing the same thing (the current timestamp)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, currentDate
does not include a timestamp, which is used in other places. That's why I created a separate variable, defaultDataUpdatedDate
, which includes the timestamp. Adding the timestamp ensures consistency with LPR dates. By the way, there is a very low chance that data?.lastUpdatedA
t will not be provided by the backend—it is almost always present. Therefore, defaultDataUpdatedDate
serves as a safety check.
b6b6f5b
to
5aef0e3
Compare
Description
JIRA-> ENT-9927
For all changes
Only if submitting a visual change