-
Notifications
You must be signed in to change notification settings - Fork 3
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
Create parent attendance display #130 #132
Conversation
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.
Hey william, let some very minor comments on your PR. Everything else looks good to me. Also, unit tests are failing
{RRule.fromString(Class.rrstring).toText().charAt(0).toUpperCase() + | ||
RRule.fromString(Class.rrstring).toText().slice(1) + | ||
", start " + | ||
monthNames[RRule.fromString(Class.rrstring).options.dtstart.getMonth()] + | ||
" " + | ||
RRule.fromString(Class.rrstring).options.dtstart.getDate() + | ||
", " + | ||
RRule.fromString(Class.rrstring).options.dtstart.getFullYear()} |
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.
can we add a comment about what this is doing - its kinda hard to understand
const getFormattedTime: string = (time: string) => { | ||
const hours24 = parseInt(time.substring(0, 2)); | ||
const hours = ((hours24 + 11) % 12) + 1; | ||
const hoursText = hours < 10 ? "0" + hours.toString() : hours.toString(); | ||
const amPm = hours24 > 11 ? " pm" : " am"; | ||
const minutes = time.substring(3, 5); | ||
|
||
return hoursText + ":" + minutes + amPm; | ||
}; |
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.
just wondering, is there no better way to do this? this forces us to keep the exact same formatting through the entire app. Maybe luxon would help here? B/c now we have to make sure the formatting is correct
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.
Yes, I agree I think something like luxon is a cleaner option, which should also address your other comment. Added in new iteration
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.
Everything is great! Enjoy your new team :)
Administrative Info
Make sure your branch name conforms to:
<feature/staging/hotfix/...>/[username]/[Github Issue]-[3-4 word description separated by dashes]
.What issue(s) does this branch close?
#130
Changes
What changes did you make?
Testing
How did you confirm your changes worked?
Confirmation of Change
Upload a screenshot, if possible. Otherwise, please provide instructions on how to see the change.