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

Humanize all date times? #128

Closed
WhyNotHugo opened this issue Feb 23, 2017 · 6 comments
Closed

Humanize all date times? #128

WhyNotHugo opened this issue Feb 23, 2017 · 6 comments

Comments

@WhyNotHugo
Copy link
Member

I'd like to evaluate humanizing all date times (probably with humanize).

  • Not the default (due to loss of precision).
  • Probably some -h/--humanize flag.

We'd have to look at pitfalls, and potential issues that may be a bit non-obvious.

@Swati4star
Copy link
Contributor

So, in this issue, we need to use
humanize.naturaltime(currentdate-date)
for all date formats?

Anything else need to be considered in this one?

@untitaker
Copy link
Member

untitaker commented Feb 27, 2017

@Swati4star It's just an idea, I don't think @hobarrera has decided on details or whether it's a good one in the first place.

@WhyNotHugo
Copy link
Member Author

We probably need:

  • A flag as mentioned above to toggle this.
  • We probably want to override he default formatter.
  • A setting in configuration to make this the default.

We probably want to use the humanize library since all higher level ones just wrap around that one.

@Swati4star
Copy link
Contributor

Do we need to mention humanize time format as default in config file. Also is there a specific format that humanize use? like

date_format = %Y-%m-%d
time_format = %H:%M

What I am getting from this is..
If humanize flag is set, display date in that format, else what is there in config file. Is it fine?

@untitaker
Copy link
Member

@Swati4star Yes, I think this only affects output, in the way you describe. Though I have been wrong about @hobarrera's ideas before :)

@WhyNotHugo
Copy link
Member Author

WhyNotHugo commented Feb 28, 2017

Do we need to mention humanize time format as default in config file.

No, humanized dates should not be the default.

If humanize flag is set, display date in that format, else what is there in config file. Is it fine?

Yes, and I'd do this subclassing the default formatter, and using that if the flag is set (similar to --porcelain).

This flag does not affect input/parsing.

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

No branches or pull requests

3 participants