Jump to content

Template talk:Age in months

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Bug

[edit]

I need help!!! It doesnt seem to want to work =( the sum is correct but it keeps saying unknown expression character '{'

Why is this? Smashman2004 (talkcontribsemail) 12:11, 25 March 2007 (UTC)[reply]

Bug fix and misc changes

[edit]

According to this template's documentation, this should return the number of full months. So on 2007-10-05, {{age in months|6|9|2007}} should be returning 0 since it is one day shy of 1 month; instead, however, it returns 1. I am changing the template to have the expected behavior.

Also, most other date templates seem to take their parameters as Y|M|D order rather than D|M|Y, and having the parameters in D|M|Y order will confuse those of us who live in countries that use M/D/Y date order. Therefore, I am also changing the date order to Y|M|D (and fixing all existing transclusions). Anomie 20:40, 5 October 2007 (UTC)[reply]

The word "ago"

[edit]

Is there a way to use this template so that it generates "x months" and not "x months ago"? Trying to use it on List of Crown Princes of Kuwait. Kohlrabi Pickle (talk) 02:06, 5 January 2021 (UTC)[reply]

@Kohlrabi Pickle: You used {{Years or months ago}} which apparently uses this template {{Age in months}}. Use {{Age in years and months}}:
  • {{age in years and months|8 October 2020}} → 4 years, 1 month
Johnuniq (talk) 02:25, 5 January 2021 (UTC)[reply]
Spectacular, thanks! Kohlrabi Pickle (talk) 02:36, 5 January 2021 (UTC)[reply]