Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃帹 Index.razor - Use Humanizer to get nice dates #36

Open
bradystroud opened this issue Oct 7, 2023 · 0 comments
Open

馃帹 Index.razor - Use Humanizer to get nice dates #36

bradystroud opened this issue Oct 7, 2023 · 0 comments

Comments

@bradystroud
Copy link
Member

bradystroud commented Oct 7, 2023

use https://github.com/Humanizr/Humanizer

instead of

string formatted;
var timeSpan = meeting.Length;
if (timeSpan.Hours > 0)
{
formatted = $"{timeSpan.Hours} hours {timeSpan.Minutes} minutes";
}
else
{
formatted = $"{timeSpan.Minutes} minutes";
}

@bradystroud bradystroud added the code review Issue that came from code review label Oct 7, 2023
@bradystroud bradystroud changed the title Code Review - Index.razor | Use humanizer to get nice dates Index.razor - Use humanizer to get nice dates Oct 7, 2023
@bradystroud bradystroud changed the title Index.razor - Use humanizer to get nice dates 馃帹 Index.razor - Use Humanizer to get nice dates Oct 7, 2023
@bradystroud bradystroud removed the code review Issue that came from code review label Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant