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

Refactor DateTime and TimeSpan humanization to use ToQuantityExtensions.ToQuantity to quantify time units #205

Open
MehdiK opened this issue Apr 13, 2014 · 6 comments
Labels

Comments

@MehdiK
Copy link
Member

MehdiK commented Apr 13, 2014

Brought over from #192

@hazzik hazzik changed the title refactor DateTime and TimeSpan humanization to use ToQuantity extension Refactor DateTime and TimeSpan humanization to use ToQuantity extension Apr 27, 2014
@MehdiK MehdiK added the jump in label Jun 27, 2014
@alimeziane
Copy link

Hi,
I am actually working on this and I have doubts about the need. This is what I understood: the aim is to restructure humanization of Datetime to have the same parameters as there in ToQuantity( like ShowQuantityAs.Words).
Is that correct?
Thanks

@hazzik
Copy link
Member

hazzik commented Apr 14, 2015

Partially covered by #405

@hazzik
Copy link
Member

hazzik commented Apr 19, 2015

@alimeziane not exactly. The idea was to use Inflector for words as "second", "minute", "hour", etc.

@hazzik hazzik changed the title Refactor DateTime and TimeSpan humanization to use ToQuantity extension Refactor DateTime and TimeSpan humanization to use ToQuantityExtensions.ToQuantity to quantify time units Apr 19, 2015
@alimeziane
Copy link

@hazzik , In the PR #405 , i added the parameter "ShowQuantityAs" to TimeSpan and DateTime humanization , it will select the display mode (numbers or words), for example :
TimeSpan.FromDays(15).Humanize(2,showQuantityAs : ShowQuantityAs.Words) --> two weeks , one day
DateTime.Now.AddDays(12).Humanize(false,showQuantityAs : ShowQuantityAs.Words) --> twelve days from now

So I think it solves the #290 issue , but I do not see anything added to solve the current issue.
If you have an example that would be cool.

@hazzik
Copy link
Member

hazzik commented Apr 20, 2015

So I think it solves the #290 issue , but I do not see anything added to solve the current issue.
If you have an example that would be cool.

You're right.

This issue is about internal implementation of time fraction quantification, to remove need of resources

@SimonCropp
Copy link
Collaborator

@MehdiK still think this is worthwhile?

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

No branches or pull requests

4 participants