Template talk:Time ago/Archive 1

Suggested change
I am recommending the first occurrence of "3600" in the template be changed to "7200" (not the second!). The line currently reads:

The new line would look like this:

Result of Change
The result of this change would be that all "edited n hours ago" less than 2 hours would appear as minutes instead of hours. Currently, both 61 minutes and 119 minutes show as "1 hour" and 59 minutes shows as just that. After this change, times like 73 minutes ago and 115 minutes ago will appear, but 125 will be "2 hours" still.

The idea came because I am watching the page Tatco where somebody put a Template:Under construction. Almost two hours later it still said "edited 1 hour ago". I do not think such a change would be controversial because it would not alter the appearance of the template and only improves its precision. ZabMilenko 05:37, 3 June 2009 (UTC)
 * Sounds reasonable. Could the same argument be applied for the other orders of magnitude, e.g. use mins up to 120, hours up to 48, days up to 60, etc.? &mdash; Martin (MSGJ · talk) 07:39, 3 June 2009 (UTC)
 * It very well could actually; "51 days" instead of "1 months" would be more useful, as would be "17 months" compared to "1 years". The following table is for the figures:  ZabMilenko 08:15, 3 June 2009 (UTC)


 * Yes, this might better reflect common usage. For example, how old does a baby have to be before his/her age is counted in years rather than months? &mdash; Martin (MSGJ · talk) 10:36, 3 June 2009 (UTC)
 * 2, but that is a trick question, because some societies count the baby's age from conception, not from birth, although after one year after birth, the gestation period is counted as one full year. 199.125.109.102 (talk) 20:27, 3 June 2009 (UTC)
 * ✅ &mdash; Martin (MSGJ · talk) 22:02, 3 June 2009 (UTC)

Protection level
I came to this page via Category:Wikipedia protected edit requests. For editing, the direct protection on the page would only make it semi-protected (reduced from fully protected due to a request). However, it is also transcluded on Cascade-protected items and User:Hersfold/Lockbox, which are fully protected with the "cascading" option. Brian Jason Drake 14:41, 26 January 2010 (UTC)


 * I should explain that, in the table in the category, the only thing I can see is:
 * "Modified by Happy-melon on 2009-06-04: “reduce to semi, per request”"
 * Yet the page is fully protected. This is confusing. Brian Jason Drake 14:52, 26 January 2010 (UTC)
 * You seem to have worked it out. Although the page is only directly semiprotected, its transclusion on the cascade-protectedCascade-protected items gives it full protection. &mdash; Martin (MSGJ · talk) 17:14, 26 January 2010 (UTC)

Specify units
It would be nice if this template could take a parameter to specify which units are used. There are occasions when one unit (e.g. hours) is needed. &mdash; Martin (MSGJ · talk) 09:00, 18 July 2009 (UTC)
 * I made changes to the sandbox that hopefully implement this. Also, I added weeks in between the days and months but not sure how I like it.  If removed, it should definitely remain as an "optional" magnitude.  Was this what you were thinking of?  ZabMilenko How am I driving? 04:15, 20 July 2009 (UTC)
 * I've made a few changes and simplified the code somewhat. &mdash; Martin (MSGJ · talk) 20:02, 20 July 2009 (UTC)
 * Way nicer. I am used to switch only taking integers, so I didn't even think to try strings.  The test cases look good too. ZabMilenko How am I driving?

I want to enhance this template, but before I do that, it should be updated to the current sandbox version (that adds error message and  parameter as discussed above). Svick (talk) 14:09, 26 January 2010 (UTC)
 * Doesn't your version stop this template working for future times? &mdash; Martin (MSGJ · talk) 17:20, 26 January 2010 (UTC)
 * It's not my version, but yes, it didn't work for future times. I fixed it, so it should be okay now. Svick (talk) 17:31, 26 January 2010 (UTC)
 * Sorry, got you mixed up with the editor above! ✅ with sandbox. &mdash; Martin (MSGJ · talk) 18:42, 26 January 2010 (UTC)

min_magnitude
In (that uses this template), returning values like “5 hours ago” doesn't make sense, because only the date (not time) is specified, “0 days ago” would be more appropriate. Setting  wouldn't be a good solution, because it would create values like “1000 days ago” (instead of the better “2 years ago”). Because of this, I added  parameter to the sandbox, that should solve this issue. Could some admin, please, update this template from the sandbox version? Thanks. Svick (talk) 20:07, 26 January 2010 (UTC)
 * I like the idea but I've been trying to do some streamlining of the code. Please let me know if it's still working correctly, and if you like my approach. &mdash; Martin (MSGJ · talk) 20:00, 27 January 2010 (UTC)
 * The current version supports setting, but it doesn't use weeks when it decides the unit itself. I added weeks to /core and sandbox, and I think that everything works as it should now. Svick (talk) 20:27, 27 January 2010 (UTC)
 * ✅ &mdash; Martin (MSGJ · talk) 21:14, 27 January 2010 (UTC)
 * Thanks. Svick (talk) 21:24, 27 January 2010 (UTC)

Proper plural

 * Discussion moved from Template talk:Time ago/core. &mdash; Martin (MSGJ · talk)

Hello, would someone be able to replace this template's code with this from Template:Time ago/core/sandbox. This code is able to find out if it's one second, or more seconds aand so on and thereby kills the "(s)", which isn't needed most of the time. Thank you, --The Evil IP address (talk) 17:53, 14 March 2010 (UTC)
 * Padlock-bronze-slash2.svg Not done: is not required for edits to  unprotected pages, or pending changes protected pages. &mdash; Martin (MSGJ · talk) 17:57, 14 March 2010 (UTC)
 * It's protected via cascading protection of User:Hersfold/Lockbox & Cascade-protected items. --The Evil IP address (talk) 18:39, 14 March 2010 (UTC)
 * (Sorry for my stupidity.) This sounds like a good idea. I haven't had a chance to check the code in detail yet, but I have the feeling that it should be simpler to accomplish this. Let's see if anyone else has a comment and if I haven't come up with a better solution in a few days then I'll happily apply your edit. &mdash; Martin (MSGJ · talk) 11:03, 15 March 2010 (UTC)
 * This is an important idea. I can't understand the code, but the pseudo-code is really simple: if num <> 1: append "s" to unit. 0 days, 1 day, 2 days, etc. 0 minutes, 1 minute, 2 minutes, etc. + m t  17:39, 20 March 2010 (UTC)
 * Yes, it is a simple idea and I think the proposed code runs fine . But it is not efficient because it is effectively doing the calculation twice and a good template shouldn't do it this way. Anyway I haven't had time to think of a better way to do it, so I will implement the request now and then probably return to this problem at a later date. &mdash; Martin (MSGJ · talk) 17:55, 20 March 2010 (UTC)
 * Actually I'm not sure if the code is working properly.  produces 15.739476072520294 years ago. &mdash; Martin (MSGJ · talk) 18:01, 20 March 2010 (UTC)
 * It's not. The problem is that even though it's displaying just "1", it's passing 1.576165931503 or so to the plural function. The "1 second ago" case is also broken due to invalid syntax in the #expr. I also note that, if fixed or the delta is exactly 1 minute, it will still incorrectly display "1 minute' time" instead of "1 minute's time". I've adjusted Template:Time ago/core/sandbox to correct all these issues. It also happens to correct the issue mentioned above that the calculation was being done twice.
 * BTW, if you want to make test cases, one easy way is to do something like ⇒, although it will occasionally screw up if the various #time calls within the template end up happening in different clock-seconds (e.g. at 12:00:00.9995 and 12:00:01.0003). Anomie⚔ 17:32, 4 June 2010 (UTC)
 * Please use the template only when a change has been agreed and the specific text to be changed has been decided. To look for help editing a template contact somebody who is familiar with templates or ask at requested templates. -  EdoDodo  talk 16:46, 5 June 2010 (UTC)
 * Whatever. There's no controversy, the edit just corrects the broken change above, and you apparently didn't even read the discussion above since you are complaining about . And if you were really paying attention, you might notice that I am someone who is familiar with templates. But hey, if you want to pettifog instead of doing anything useful, I really don't care. Maybe someday someone who actually knows what is going on will revive this suggested change. Anomie⚔ 13:59, 6 June 2010 (UTC)
 * Really sorry, you're right, I didn't read the discussion properly and I thought you were asking somebody to make the changes, not just asking somebody to copy the text from the sandbox. I've re-enabled the template, so hopefully an admin will sort this out soon. - EdoDodo  talk 14:11, 6 June 2010 (UTC)
 * No problem, thanks. Anomie⚔ 16:36, 6 June 2010 (UTC)
 * ✅ Thanks for working on this &mdash; Martin (MSGJ · talk) 16:53, 6 June 2010 (UTC)
 * ✅ Thanks for working on this &mdash; Martin (MSGJ · talk) 16:53, 6 June 2010 (UTC)

Pages using this template need to be purged regularly
Is there any way to ensure that pages using this template are purged regularly? I went to Foxit Reader and it said something like "Stable release ... (May 3, 2012; 2 days ago)" when May 3 is clearly more than 2 days ago. Can such pages be purged daily? Or would this require a change to the software? Set theorist (talk) 06:36, 14 May 2012 (UTC)

Edit request
Please add to the bottom of the template. This would, if the  parameter was set to , there would be an option to purge the page. This was suggested by MSGJ at Template talk:Userspace draft. Example:

([ purge])

Thank you. — Hue Sat  Lum  22:50, 30 May 2012 (UTC)
 * What is the purpose of ? &mdash; Martin (MSGJ · talk) 06:54, 31 May 2012 (UTC)
 * Sorry, you don't need that. The new suggestion is:
 * Thanks, — Hue Sat  Lum  22:19, 31 May 2012 (UTC)
 * Thanks, — Hue Sat  Lum  22:19, 31 May 2012 (UTC)

✅: please let me know if there are any problems. Thanks. Chris Cunningham (user:thumperward) (talk) 09:23, 1 June 2012 (UTC)

Trailing space
It looks like the template can leave a trailing space: To me this looks like an undesired feature. -DePiep (talk) 10:14, 13 June 2012 (UTC)
 * &rarr; (12.586051415017758 years ago)
 * Looks like it is in this:

...   |#default= 0 }} }} }}

The final line has: }} {{#ifeq:{{{purge ... When a purge link is requested and added, the space acts as expected, and is a nice line-breaking point. But when no purge is requested, it should be a final space and so removed (whitespace behavour). Instead, the unused {{code|&ltspan>}} still is detected,andso the space is not the final whitespace character and stays.
 * Possible sol;ution: add the space as {{code|&amp;x20;}} right before the purge-&lt;span>, remove the current one. -DePiep (talk) 10:31, 13 June 2012 (UTC)

Edit request
Issue: trailing space may show up (see above). Solution reasoned & tested through sandbox. Request: Please copy code (or the simple diff effect) to the live version. What changes? See the diff Take a look at the final #ifeq ... construct. Before is a regular space. Code change is: 1. remove that space, and 2. add right before the &lt;span> tag the code &amp#x20;. For the reasoning see above. This sandbox version is tested in, first section. Also tested: line breaking effects before/after. -DePiep (talk) 10:47, 13 June 2012 (UTC)
 * Yes check.svg Done Although your analysis about an "unused &lt;span&gt;" seems off, the solution is correct. Anomie⚔ 14:54, 13 June 2012 (UTC)
 * Sure you would discribe it different, and I am also sure you do understand what it says. -DePiep (talk) 15:40, 13 June 2012 (UTC)

floor'ing vs rounding
Why are we not rounding? It seems to produce more accurate results than floor'ing. See the Template:time ago/core/sandbox sandbox and Template:time ago/core/testcases. Cpetty-wiki (talk) 04:09, 21 October 2012 (UTC)

Sortable tables
This template doesn't sort correctly in sortable tables. If you sort a column whose cells use this template, then you'll get alphabetic sorting (i.e. it'll sort in an order like "2 days ago, 2 hours ago, 2 years ago, 3 days ago, 3 hours ago, 3 years ago"). As much as I'd like to deconstruct this template and figure out how it works in order to fix this issue, I don't have the time to do that at the moment. Is there anyone around who already understands how this template works, and might be able to fix this issue? Perhaps it is as easy as adding in some invisible text, like the dtsh / ntsh templates do. Thanks. ‑Scottywong | gossip _ 01:51, 10 January 2013 (UTC)
 * Ideally, the table cell should have an appropriate value in its  property:


 * HTH. Anomie⚔ 03:22, 10 January 2013 (UTC)


 * Thanks, that does help. I still think it would be ideal if this template would automatically sort correctly without setting the data-sort-value property of the cell, but this works for now.  ‑Scottywong | chat _  23:05, 10 January 2013 (UTC)
 * The really nice thing about data-sort-value is that it's not an awful, deplorable hack. Anomie⚔ 02:46, 11 January 2013 (UTC)
 * Oh, don't be such a code snob. Long strings of invisible numbers can come in handy every once in awhile... :p  Thanks again. ‑Scottywong | gab _  05:22, 11 January 2013 (UTC)

Coding in other languges
Hi I would like some help to change the codes so it works in other languges it works but you have use the English months and days. But I would like to change the codes so it allows them to write the months and days in there languges please Skybliei (talk) 10:56, 12 April 2013 (UTC)
 * Why? This is the English Wikipedia... ‑Scottywong | prattle _  13:36, 12 April 2013 (UTC)

Number of days in a month
This template assumes a 31 day month, but the average number of days in a month is 30.436875 (see Month). I suggest we change 5356800 (representing 2 months) to 5259492. A ~27 hour difference. Cpetty-wiki (talk) 01:16, 21 October 2012 (UTC)
 * And same goes for the .  We should change 2678400 to 2629746 in that template. Cpetty-wiki (talk) 01:24, 21 October 2012 (UTC)


 * I agree the count of months should be improved. I came here after seeing Gibraltarpedia today, 13 July 2013, saying "Launched 12 July 2012; 11 months ago". 12.071097077181633 years ago also returns "11 months ago" today when it's actually 12 months and 6 days. And 13.005343652524099 years ago says "22 months ago" when it's 23 months and 12 days. PrimeHunter (talk) 23:08, 13 July 2013 (UTC)

Edit request on 30 September 2013
I am requesting that this template be updated to use a non-breaking space between the number and the units (year, month, week, day, hour, minute, second). This would replace the current breaking space that is generated by Template:Plural (which now has an option to use non-breaking space). A breaking space would still be used between the units and "ago" (similar to the output of Template:Start date and years ago). The template to be updated is Template:Time ago/core and the updated code can be found in Template:Time ago/core/sandbox (please do not copy Template:Time ago/sandbox which was temporarily updated to use the sandbox version of /core in order to display examples and test cases). The output of the following examples was placed inside a narrow &lt;div&gt; to force a line break. Additional examples can be found at Template:Time ago/testcases.

-- Zyxw (talk) 03:59, 30 September 2013 (UTC)
 * ✅ &mdash; Martin (MSGJ · talk) 12:09, 2 October 2013 (UTC)

Spell out numbers less than 10
It is usually improper grammar to use 1 to 9 in prose; they should be spelt out. I wouldnt expect that change to have a negative impact, but haven't looked at all the instantiations of this template yet. The one case where I saw the problem was on Template:Userspace_draft, where names rather than numerals would be an improvement. John Vandenberg (chat) 01:33, 7 October 2013 (UTC)
 * This is technically possible, with the immediately-obvious downside of increased complexity implying reduced speed. But should it be done? Besides showing that certain numbers outside the 1-9 range may also be spelt out, MOS:NUMERAL gives a number of exceptions, so it's not a universal rule. Directly relevant is the first bullet, since could potentially be used in infoboxes. I know it's not used as a subtemplate of, but there may be related templates which do use . -- Red rose64 (talk) 07:10, 7 October 2013 (UTC)
 * The page caching makes the complexity and render speed of little consequence.
 * The width of the template result is an interesting consideration that I hadn't considered, and your concern about use in infoboxes is spot on. A bit of digging around reveals that one of the primary uses of this template is the software age templates (Template:Latest stable software release) where the text already wraps in the infoboxes (see Firefox), and sure enough the call is found in start date and age which could be used in many other ways in infoboxes and tables.
 * Fwiw, the longest spelt out number less than 10 will be 'seven' (for proportional widths), and also 'eight' for mono-spaced fonts, which is only four additional characters (as opposed to one numeral). In most cases, four additional characters won't cause the text to wrap.  The layout in the Firefox infobox is already nasty, and a redesign is needed to present the info more clearly. John Vandenberg (chat) 07:59, 8 October 2013 (UTC)
 * Stylistically, for a single use it is preferable to write numbers less than 10 in words. However if there are multiple uses of this template (e.g. in an infobox like Firefox) it is awkward to see 21 days ago adjacent to seven days ago. A consistent approach is better. As it is not possible to detect when the template is used in prose and when it is used in a table, I would probably oppose a blanket change. However perhaps it would be possible to add an option to the template for using words when desired? &mdash; Martin (MSGJ · talk) 08:21, 8 October 2013 (UTC)
 * Adding an option (default: disabled) would be a good way to approach this. John Vandenberg (chat) 08:46, 9 October 2013 (UTC)
 * I've just created Module:NumberSpell, which spells out numbers from 0 to 100. I think it would be a good idea to use it in Module:TimeAgo, but what would be the best way of doing it? Spell 1-9 out by default, and spell out other numbers if an optional parameter is set? Or make all spelling out optional? — Mr. Stradivarius  ♪ talk ♪ 20:07, 13 January 2014 (UTC)
 * Thank you! I think an option is necessary. spellout=yes/no/auto, where 'auto' spells out 1-9.  Default to 'no' is the easiest option - no forced changes, so no fallout is possible.  If you want to make 'auto' the default, after you implement it we'll need to quickly spot check all usages to be sure it isn't buggering up layouts, and be attentive to any complaints. John Vandenberg (chat) 00:18, 14 January 2014 (UTC)

Ok, I've added two parameters to time ago/sandbox -  and. can be set to "yes" or "auto" like you described above, and is off by default. is the maximum number that can be spelled out. Here are a few examples: I'll leave this open for comments a little while longer and then implement it if there are no issues. It would be easy to switch the template to use auto by default if people would like that better. — Mr. Stradivarius  ♪ talk ♪ 13:15, 14 January 2014 (UTC)
 * &rarr;
 * &rarr;
 * &rarr;
 * &rarr;
 * &rarr;
 * &rarr;
 * Note - I added this to the live template yesterday, so this can now be rolled out to other templates and articles. — Mr. Stradivarius  ♪ talk ♪ 07:43, 29 January 2014 (UTC)

Suggesting to Module:TimeAgo
I will suggest that  is moved to the place where the function from the module is used. In this way the module is only transcluded if it is used, e.g.: Christian75 (talk) 10:05, 30 January 2014 (UTC)


 * This is an interesting suggestion. You're right that doing things this way wouldn't load the NumberSpell module unless it was used; however, I don't think that it would have any appreciable effect on performance compared to the current module. I'll ask at WT:Lua about that just in case I'm wrong. — Mr. Stradivarius  ♪ talk ♪ 10:33, 30 January 2014 (UTC)
 * See Module:ConvertNumeric for the last word in spelling numbers! (It is used by Module:Convert, but the name is coincidental as it was created by Dcoetzee.) One factor about require is that if a module always requires something, that something has to be available, even if unused. I wanted Module:Convert to be easily usable at other wikis, and the spelling only works in English and is rarely used, so Convert only requires ConvertNumeric if needed, and it fails gracefully if it is not present (in that case, the results are displayed with digits and are not spelled). The module is ultra complex so I'll mention that anyone wanting to see the relevant code should search for the  function which requires ConvertNumeric the first time the function is called.
 * Scribunto is very fast, so the overhead of requiring an unused module is probably not a problem, particularly when the module is small. However, Lua will methodically convert the entire required module to code for each template that invokes Module:TimeAgo (ten times if the template occurs ten times on a page), and it is irritating to repeat such work when unnecessary.
 * Another factor is that Special:WhatLinksHere/Module:NumberSpell is not helpful as it shows all pages where the module is required, whereas presumably it is only used on a small fraction of those pages.
 * On balance, I would be inclined to have something like this:
 * (near the top of the module)
 * (just before use)
 * Then the module is only required if used. Perhaps for TimeAgo, you know that  will only be called once, so the " " is not needed. OTOH, if it is only called once, you could do this:
 * Johnuniq (talk) 11:19, 30 January 2014 (UTC)
 * Johnuniq (talk) 11:19, 30 January 2014 (UTC)

Outputting only the number or unit
Currently, it's possible to suppress the word "ago". Would it be feasible to add an option to suppress either the number or the unit (thereby outputting only the other)? For example, if the duration is 15 hours, it would be possible to output either "15" or "hours"/"hours ago" on its own. —David Levy 21:20, 4 June 2014 (UTC)

Case sensitive
Hi - If there is a change in case, can a note be added to the main Template page? (As I don't expect 104,000 pages to be notified of the change.) When I went to WP:FIX today, a 'time ago' on December 27, 2014 was listed as 22 hours ago today. Changing all 'time ago' to 'Time ago' corrected the problem. Thank you! Sct72 (talk) 21:15, 24 January 2015 (UTC)
 * Template names, like article names, are always case-insensitive for the first letter: there is no difference in effect between and . This template, like all of the date/time calculation templates, does not update calculated values automatically: an edit to the page is required. The nature of the edit is immaterial: any edit will work, even a null edit. Making alterations  may appear to "fix" the problem, but none were necessary. Have a look at the page this time tomorrow: you'll see that it appears to be out of date by approximately 24 hours - unless somebody else has edited the page in the meantime. -- Red rose64 (talk) 21:31, 24 January 2015 (UTC)
 * Either the issue is corrected, or there's a larger issue that needs to be fixed. I guess we will find out. But for now, December 27, 2014 is showing the correct 28 days ago on WP:FIX. Sct72 (talk) 22:41, 24 January 2015 (UTC)
 * You misunderstand. The very act of editing the page causes all the calculations to be redone. If there is no edit, there is no recalculation. This is why you occasionally see biographical articles which show the "wrong" age in the infobox: the age is calculated by, which has nothing special to update it - it relies on the page being edited on (or fairly soon after) the person's birthday in order for the age to be updated - simply viewing the page is not enough. This is why you sometimes see IPs making edits which (even if they don't break the layout in so doing) are unproductive. A simple WP:NULLEDIT (or perhaps even a WP:PURGE, which causes less server load) would have done the job - but some sort of action is necessary, the page won't update on its own; there is no means to make an automatically-updated value. The underlying code of  and  do basically the same job: they subtract some moment in the past from the current time to give an elapsed time.
 * For small numbers of pages that need to have these elapsed times recalculated on a frequent basis (such as categorising the articles in these dated cats into after seven days), we have, which simply makes a WP:NULLEDIT and in so doing forces all templates to be reparsed and all categories to be redetermined; but I don't think that  would be willing to run it on [//tools.wmflabs.org/templatecount/index.php?lang=en&name=Time_ago&namespace=10#bottom over 100,000 pages] on a daily basis for evermore. -- Red rose64 (talk) 23:13, 24 January 2015 (UTC)
 * I have updated WP:FIX with a note on updating the Time Ago column. Thank you for the information. Sct72 (talk) 21:17, 31 January 2015 (UTC)
 * I have simplified your note with Purge.[//en.wikipedia.org/w/index.php?title=Wikipedia:WikiProject_Fix_common_mistakes&diff=645055837&oldid=645045864] PrimeHunter (talk) 22:35, 31 January 2015 (UTC)
 * Yeah, Null Bot can't scale to that problem, not a matter of equipment, just the wrong solution for that big a problem. --j⚛e deckertalk 04:05, 4 February 2015 (UTC)

Is there as way to input an interval + current date = displayed date?
In other words: Can you display a year that is always 17 years ago, so updates like this are no longer necessary? Sorry if already covered or I'm missing something. -- Racer X11 Talk to me Stalk me  00:21, 8 May 2015 (UTC)


 * produces . See mw:Help:Extension:ParserFunctions for a more advanced function. PrimeHunter (talk) 00:33, 8 May 2015 (UTC)


 * Thank you very much! -- Racer X11 Talk to me Stalk me  00:36, 8 May 2015 (UTC)
 * produces . For comparison, less typing. –Be..anyone (talk) 19:42, 26 May 2015 (UTC)

Yesterday, Today, and Tomorrow
Hello! Can someone more familiar with Lua than I make the appropriate modifications to have the module return a relative day in the following situations: Thanks! — &#123;&#123;U&#124;Technical 13&#125;&#125; (e • t • c) 15:33, 12 December 2014 (UTC)
 * → Yesterday
 * → Today
 * → Tomorrow
 * → Tomorrow
 * I agree this would be a nice feature, although of course 12 hours ahead is not always going to be tomorrow, and 36 hours ahead might be two days into the future. &mdash; Martin (MSGJ · talk) 10:18, 9 July 2015 (UTC)

Permit null argument for ago keyword
In some cases, a sentence will end with a time period. For instance, the template may help construct the phrase "where he has worked for the past 20 years." A recent coding change has made it impossible to nullify the "ago" argument, causing a space to be inserted after the units. Without the option of a null value, we are relegated to either rewording the sentence, or accepting a space between the units and the punctuation. As an example, coding "ago=." will yield "where he has worked for the past 20 years ." Can the forced space before the "ago" variable be omitted when the keyword has a null value?Antarctic96 (talk) 23:49, 12 January 2014 (UTC)
 * I've done it, so now the code  will produce "He has worked for FooBar Corp for the last 39.602489771372404 years ago." Let me know if you notice any other discrepancies between the old version of the template and the new Lua version. Best — Mr. Stradivarius  ♪ talk ♪ 05:15, 13 January 2014 (UTC)
 * could the same or additional parameter be used to suppress the "' time" output for future times? For example, in a table with column heading "expires" is it obvious enough just to use "2 years" rather than "2 years' time". Thanks in advance &mdash; Martin (MSGJ · talk) 10:18, 9 July 2015 (UTC)
 * Ok, it's up live, using the blank "ago" parameter syntax. — Mr. Stradivarius  ♪ talk ♪ 14:17, 9 July 2015 (UTC)

Template-protected edit request on 26 March 2018
Lines 16 and 27 of the module create globals, that cause errors with Module:No globals. Please add  to the beginning of each of these two lines. Luis150902 ( talk  &#124;  contribs ) 22:16, 26 March 2018 (UTC)
 * Thanks, I did that. Johnuniq (talk) 00:34, 27 March 2018 (UTC)

Sawiki error
Line 56 of the module giving error in sawiki. Maybe it's because of the no. conversion. Can someone please help? Capankajsmilyo (talk) 04:56, 2 April 2018 (UTC)
 * As at Module talk:WikidataIB, please provide a link to a page demonstrating the problem. Did you try the solution you found? By the way, test modules should be under Module:Sandbox, see Special:PrefixIndex/Module:Sandbox. Johnuniq (talk) 05:10, 2 April 2018 (UTC)
 * PS. sa:Template:Time ago for the error which is "लुआ त्रुटि पटलम्:TimeAgo में पंक्ति 56 पर: attempt to perform arithmetic on a string value।". Capankajsmilyo (talk) 06:48, 2 April 2018 (UTC)
 * Further is for templates. How can we use them in module? Capankajsmilyo (talk) 06:49, 2 April 2018 (UTC)
 * I just edited sa:Module:TimeAgo to insert "xn" which I found at mw:Help:Extension:ParserFunctions. Apparently, using "U" gets the Unix time in local digits, whereas "xnU" gets it in English digits. The enwiki module should probably use "xnU" to make it easier for other Wikipedias. When I mentioned formatnumber I was imagining the problem must concern input to the module. Johnuniq (talk) 07:48, 2 April 2018 (UTC)
 * Thanks a lot . I too request enwiki module editors to please make changes as suggested by Johnuniq. Capankajsmilyo (talk) 08:27, 2 April 2018 (UTC)

Please see my edit at sawiki: diff. You might like to contemplate that (see "xnU" above with link to doc) and put it in Module:TimeAgo at enwiki. Johnuniq (talk) 09:14, 2 April 2018 (UTC)

How to remove time unit?
I need to remove the time unit for the table on List of most-subscribed YouTube channels. How do I do that? Ping me if you reply. —Wei4Green &#124; 唯绿远大 (talk) 23:16, 2 April 2019 (UTC)

'purge'
'Update timer' would be a lot clearer to non-technical folks. Headbomb {t · c · p · b} 20:30, 20 August 2018 (UTC)
 * I agree. —Wei4Green &#124; 唯绿远大 (talk) 23:47, 2 April 2019 (UTC)

Requested move 30 October 2019
<div class="boilerplate" style="background-color: #efe; margin: 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">
 * The following is a closed discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review after discussing it on the closer's talk page. No further edits should be made to this discussion. 

The result of the move request was: Moved (closed by non-admin page mover) Wug·a·po·des​ 04:58, 8 November 2019 (UTC)

– Match name with template. * Pppery * <sub style="color:#800000">it has begun... 22:09, 30 October 2019 (UTC)
 * Module:TimeAgo → Module:Time ago
 * Why did people keep CamelCasing the titles of modules they created to implement templates with spaced out titles. * Pppery * <sub style="color:#800000">it has begun... 22:09, 30 October 2019 (UTC)


 * Support. My guess is that it's just a disease of copying other modules. --Gonnym (talk) 07:24, 31 October 2019 (UTC)


 * The above discussion is preserved as an archive of a requested move. <b style="color:red">Please do not modify it.</b> Subsequent comments should be made in a new section on this talk page or in a move review. No further edits should be made to this section.

PLURAL support
It would be great if this module allowed the use of the plural magic word. Please see this thread about how it was implemented for Module:Age. – Srđan (talk) 17:36, 21 April 2021 (UTC)

Apparent bug in "weeks" calculation when input is YYYYMMDDHHIISS with hour=0 and minute=0
Please see the test cases page for a demonstration of an apparent bug in the "weeks" output when the input time format is YYYYMMDDHHIISS and both the hour and minute values are 00. My gut feeling is that the bug, if it is a bug, is in the module code if input.hour == 0 and input.minute == 0 then. – Jonesey95 (talk) 17:56, 1 February 2022 (UTC)
 * I'm starting with some links as self-reminders. This started at VPT and you added some new testcases, which need familiarity with the #time documentation. I tried to make a simple test so I could examine what's going on but after struggling with #time I don't understand the new tests. Is 521 correct? 521 hours = 21 days 17 hours which #time is rounding to 22 days for Ymd format.
 * The numbers in the two tests marked as having erroneous outputs gave these results when I previewed a sandbox edit an hour or two ago.
 * → 20220202041747
 * → 20220111000030
 * → 20211214000030
 * I am confident that the following template gives correct results. It is showing the time difference that time ago would have determined when I did the test above. This shows that the results (3 weeks ago and 7 weeks ago) are correct.
 * → 22 days, 4 hours, 17 minutes and 17 seconds
 * → 50 days, 4 hours, 17 minutes and 17 seconds
 * On the other hand, I believe you are correct about the 30-second difference being a problem. I tried another method to generate the problem, as below. I'm not suggesting to use this in the testcases—I'm just working with something I'm more familiar with. Today (20220202) the extract stuff generates 20220112 which is 21 days ago.
 * → 24.59427059335363 years ago
 * Johnuniq (talk) 06:18, 2 February 2022 (UTC)
 * Johnuniq (talk) 06:18, 2 February 2022 (UTC)

Oops, I had forgotten but now see that I edited Module:Time ago/sandbox in April 2019. Also, I see that the module uses Module:Date for the time difference so that's my problem. Meanwhile, I have added parameter  to the sandbox module so time ago/sandbox can use a specified date/time instead of the current date/time. The value is the wanted Unix time (seconds since the start of 1 January 1970). That can be found from  (which is the same as   except that   gives non-English digits at some other languages, while   always gives a plain English number) any time/date text that is accepted by both #time and Module:Date.

The following should be showing a time difference of exactly 14 days. Module:Date knows the correct number of weeks as shown by: I'll examine what's going on but that might not be for a day or two. Johnuniq (talk) 08:39, 2 February 2022 (UTC)
 * Update: The crazy result above (it was showing "4 weeks ago" instead of 2) is due to my quick addition of parameter  being faulty. For some reason, the module refers to the input twice but I only inserted   for the first occurrence where it didn't achieve anything. More time needed. Johnuniq (talk) 09:15, 3 February 2022 (UTC)
 * I have fixed Module:Time ago/sandbox so args.now works correctly and the test above works. Now I'll think about what the actual problem is. Johnuniq (talk) 02:39, 4 February 2022 (UTC)

Here is what the module does with the two testcases flagged as "erroneous". This shows the results that would have occurred at the "now" time (2022-02-02 04:17:47). These results look good to me. Johnuniq (talk) 04:22, 4 February 2022 (UTC)