You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No need for two methods to show either xxxAgo() or xxxFromNow(). One method with a flag (isFuture) is enough & method should use the proper format from resources.
No need for two methods to show either Singlexxx() or Multiplexxx(int count). Again, one method with input (with default = 1) is enough
Not sure about this yet, but I'm thinking we should also refactor the DefaultFormatter
Split it into two formatters: DateTimeFormatter & TimeSpanFormatter
Shorten names by removing prefixes DateHumaniz_xxx & TimeSpanHumanize_xxx
Great ideas. This issue is however only about refactoring the implementation of DateTime.Humanize extension: the method is around 70 LoC & IMO a method over 20 lines is already too long!!
You're talking about formatters which is a different issue. So I created #102 and copied your thoughts over. I think refactoring formatters could make this method a bit cleaner but I still think we need to have much fewer if conditions and lines of code in this method.
DateTime.Humanize
has gotten a bit complex over time. It needs to be refactored.The text was updated successfully, but these errors were encountered: