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
The result would now be "last [nameOfWeekDay]", but it would be nice to have "day before yesterday".
Would it be possible/good to have an extra method in the PrettyTime class for 'day before yesterday' and 'day after tomorrow'?
Is it possible to get a list of possible PrettyTime relatives instead of the one? So in the example above, you might get both "last [nameOfWeekDay]" and "day before yesterday". The same could go for saying something happened "last month", "1 month ago" or "last [nameOfMonth]".
The text was updated successfully, but these errors were encountered:
Thanks for your feedback. Before discussing your enhancement requests, let me say that Time4J strongly infers the text resources from CLDR unicode repository. As far as I remember, CLDR does not use relative time expressions based on more than one unit. However, if you can cope with normal duration expressions which are not relative (to current clock time) then such durations can deploy multiple units (for example print(temporalAmount)).
About your other questions in detail, I will have a check maybe on next weekend.
Sorry for late reply. About your detailed questions:
Would it be possible/good to have an extra method in the PrettyTime class for 'day before yesterday' and 'day after tomorrow'?
This is nice but hard to generalize for other languages than English.
Is it possible to get a list of possible PrettyTime relatives instead of the one? So in the example above, you might get both "last [nameOfWeekDay]" and "day before yesterday". The same could go for saying something happened "last month", "1 month ago" or "last [nameOfMonth]".
If I have understood you correctly then you wish to set a kind of style attribute on a given PrettyTime-instance. The new attribute could be based on an enum enumerating the variations you mentioned. This is probably possible as long as CLDR data support the different variations. For example, expressions like "last Sunday" or "yesterday" are already supported (but the user would get a new choice to control it explicitly), and expressions like "last month" or "next week" could be supported in the future by deriving the data from CLDR into Time4J. About "last December", I am not sure.
Hi MenoData,
Great library with support! I had a couple of questions.
The result would now be "last [nameOfWeekDay]", but it would be nice to have "day before yesterday".
Would it be possible/good to have an extra method in the
PrettyTime
class for 'day before yesterday' and 'day after tomorrow'?Is it possible to get a list of possible PrettyTime relatives instead of the one? So in the example above, you might get both "last [nameOfWeekDay]" and "day before yesterday". The same could go for saying something happened "last month", "1 month ago" or "last [nameOfMonth]".
The text was updated successfully, but these errors were encountered: