Jump to content

Template:Last N edits/doc

From Wikipedia, the free encyclopedia

Create a page history link showing the last N edits to a given page prior to a given date.

Usage[edit]

  • {{Last N edits|pagename|number|timestamp|disp=display text}}
  • {{lne|page=pagename|num=number|ts=timestamp|disp=display text}}

Parameters[edit]

All parameters after the first are optional.

  • |1= or |page= pagename (required)
  • |2= or |num= number of edits to display (optional; default:50)
  • |3= or |ts= return edits from strictly before this timestamp; YYYYMMDDhhmmss (optional; may be truncated on the right; default: NOW)
  • |disp= specify the text to be displayed in the link (optional; default: 'these/last N edits')

Details[edit]

param |ts=

When positional parameter 3 (or |ts=) is given, results are strictly before the value given; so that |ts=20210815231530 returns results on or before 23:15:29. Digits may be left off on the right, this implies they are zero-filled; i.e, |ts=20210815 is equivalent to |ts=20210815000000, which means the most recent possible result would be an edit on August 14 just before midnight. Likewise, |ts=202108 returns the last edits in July; |ts=2021 returns the last edit(s) in 2020, and so on.

When |ts= is absent, the link text displays "last N edits"; when present, it displays "these N edits", unless overridden by |disp=.

Note: when |ts= is absent, the template provides a link to all edits up to the present moment. This link may therefore provide different results if you refresh the page at a later time, if the user has made additional edits in the interim. To show all edits up to the moment you placed the template, and freeze it at that point so that future edits by the user do not affect the results, use |ts={{subst:TIMESTAMP}}. See Examples below.

Examples[edit]

  • {{Last N edits|User talk:Jimbo Wales|10|20030724}}these 10 edits (note: counted as 00:00 on the 24th)
  • {{Last N edits|User talk:Jimbo Wales|33|200307242300}}these 33 edits (note: counted as 23:00 on the 24th)
  • {{Last N edits|User talk:Jimbo Wales|num=7|ts=20030725}}last 7 edits
  • {{lne|User talk:Jimbo Wales|num=1|ts=2015|disp=last edit in 2014}}last edit in 2014
  • {{lne|User talk:Jimbo Wales|ts={{subst:TIMESTAMP}}}}these 50 edits (note: uses time NOW, but then freezes the link at the time the page was saved; see Parameter details above)

See also[edit]

Redirects:

Other templates: