Skip to content

Conversation

@Dieterbe
Copy link
Contributor

Proposed Changes

Related Issue(s)

If applicable, please link to any related issues (Closes #123,
Closes wger-project/other-repo#123, See also #123, etc.)

Please check that the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Set a 100 character limit in your editor/IDE to avoid white space diffs in the PR
    (run dart format .)
  • Updated/added relevant documentation (doc comments with ///).
  • Added relevant reviewers.
image
}

/// Formats a Duration into a human-readable string with years, months, and days
String humanDuration(DateTime startDate, DateTime endDate) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just use an external package for this (one of the very first results was https://pub.dev/packages/humanize_duration), then we would also have i18n solved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these types of libraries don't do it the way i think makes sense.
e.g. day A you reported a weight at 9:20 AM, one day later you weigh in at 9:00 AM, i think that should qualify as "a day"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants