Changed timeago_init(), now it supports arbitrary date types, checks if any of those used the defined TIMEAGO_FORMAT_* formats. See attached patch.
| Comment | File | Size | Author |
|---|---|---|---|
| timeago-support-custom-date-types.patch | 1.63 KB | temaruk |
Changed timeago_init(), now it supports arbitrary date types, checks if any of those used the defined TIMEAGO_FORMAT_* formats. See attached patch.
| Comment | File | Size | Author |
|---|---|---|---|
| timeago-support-custom-date-types.patch | 1.63 KB | temaruk |
Comments
Comment #1
icecreamyou commentedWhat is the point of this patch? It seems very unlikely that anyone would use exactly one of the Timeago formats without using one of the provided default formats since that would be duplicating them.
Comment #2
temaruk commentedIt would make sense in the case of comments. Imagine several content types with commenting enabled, but only some of them (or only one) would need a different date type (using a Timeago format) for rendering the created/changed date of its comments. Well, of course, changing the date type for comments per content type is not really possible via configuration, unless another module is installed which allows this (e.g. Displays Suite, Comment Goodness).
However, if your assumption is that the Timeago formats would not be used without the default formats, then I would recommend not showing them as options for custom date types.
Comment #3
icecreamyou commentedOh, I see now -- I thought by "date type" you meant "date format."
Committed to dev - thanks!
Comment #4
temaruk commentedCool! Hope it will be useful for others as well!