-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat(tupaiaWeb): RN-1304: Date offsets for year granularities #5695
Conversation
.startOf(value.momentUnit) | ||
.format(value.rangeFormat); | ||
const prevEndDate = momentToDateDisplayString( | ||
moment(END_DATE).add(-1, value.momentShorthand).endOf(value.momentUnit), |
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.
moment(END_DATE).add(-1, value.momentShorthand).endOf(value.momentUnit), | |
moment(END_DATE).subtract(1, value.momentShorthand).endOf(value.momentUnit), |
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.
Sorry about the delay! I had gotten partway through this and then closed the tab at some point 😅
The complexity here is a bit beyond what I can grasp just by looking at the code, but got nothin’ to complain about in any given part. Do tag Rohan if there’s something you wanted a more rigorous review on
merge: update branch with latest dev before testing
merge: update branch with latest dev
merge: update branch with latest dev
Issue RN-1304: Date offsets for year granularities
Changes:
dateOffset
config in dashboard items to allow for offsets to be set for period granularities. Currently only works as expected with year/single year granularities. Assume that there will be unintended results with any other granularity for now.dateRangeDelimiter
config for dashboard items, which allows a custom delimiter to be set for offset ranges, for single years, e.g.June 2019/May 2020
etc. Only applies to single date rangesScreenshots: