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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #101: Draft for precision-based calculator #1

Closed
wants to merge 5 commits into from

Conversation

wahidshalaly
Copy link
Owner

This was an interesting issue. The point what makes me don't feel free while implementing this is the static extension method Humanize(). I understand its value but I think it has side effects. Sure, this is not final but I'll stop until I get your feedback.

Note: There's a proposal to how to unify DateHumanize() & TimeSpanHumanize() in DefaultFormatter. Tell me what do you think.

…ze() method very compact & also give us chance to introduce a new way of calculation, precision-based calculation. By this we can have a non-breaking change since that it's optional to choose between the default (old) calculator & the precision-based (new) calculator. Also It'll be open for everyone to have his own calculation if there's a special need.
Duplicated DateHumanizeTests, as PrecisionBasedDistanceOfTimeTests, to examine compatibility with previous calculation method.
Minor refactor: replaced Dotiw by DistanceOfTime in namespaces & types.
@wahidshalaly
Copy link
Owner Author

Accidentally created pull request against forked repository (origin) instead of the original one (upstream)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant