Time ago formater works good to find user age per year. But it add unnecessary wording: "29 years 2 weeks ago"
1. How to only output "29" integer for age???
2. How come no language or text string options? Is it baked in? Am I missing a README?
I have search module for 2+ hours trying to discover removal of string...
Any help please? My English not so good. I am new to Date module. Thank you!
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 1405364-format_interval_option-no-ago.patch | 3.67 KB | snufkin |
| #5 | 1405364-format_interval_option-no-ago.patch | 3.67 KB | snufkin |
| #3 | 1405364-format_interval_option-no-ago.patch | 2.75 KB | snufkin |
Comments
Comment #1
karens commentedThis is a way, but there was some broken code keeping it from working right.
http://drupalcode.org/project/date.git/commit/1a7dd41
Comment #3
snufkin commentedIt would be really useful if the module would offer an extra option for this out of the box, otherwise I would have to create a contrib module duplicating a lot of the formatter code, because there is no other way to overwrite it unfortunately.
Attaching a patch that adds an extra settings option to the formatter and depending on that boolean appends the 'ago' bit, or not.
Comment #5
snufkin commentedFixed a silly syntax error and actually tested it.
Comment #6
arlinsandbulte commentedCode style: incorrect indentation.
Comment #7
snufkin commentedNasty tabs, sneaking up on innocent developers.
Comment #8
karens commentedI'll see you and I'll raise you one. I switched this around so it has all the same options that Views uses for the format_interval display. That way all the options (and translations) will be the same.
http://drupalcode.org/project/date.git/commit/cf89e5f