-
Notifications
You must be signed in to change notification settings - Fork 573
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
renderSpan: add more time intervals #5568
renderSpan: add more time intervals #5568
Conversation
109fdd6
to
4c4e0dc
Compare
I think we should add a few tests in the test file for these new cases. |
added tests for renderSpan and renderEstimate. Updated renderEstimate to return largest 3 intervals (y, M, d) for longer periods and renderSpan outputs largest 2 intervals (e.g. y, M / M, d / d, h) |
Ok the PR looks good. Assuming the tests pass we should merge this in. |
Fixed linting error: added comma after forceMinute
…ved unused tr import
aa7f611
to
3130101
Compare
Summary
Added years, months, and days to renderSpan
Estimated years to 365 days and months to 30 days.
Testing Plan
Lock and unlock a wallet with flags for various time intervals.
Confirmed it returns the highest 2 time units (year & month, month & day, etc.)
Documentation
N/A
Breaking Change
N/A