Editing
Module:Random/doc
(section)
From Thetacola Wiki
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Date == The <code>date</code> function outputs a random date. {{#invoke:random|date|''timestamp1''|''timestamp2''|format=''date format''|same=''yes''}} * If no timestamp arguments are specified, the module outputs a random date in the current year. * If <code>''timestamp1''</code> and <code>''timestamp2''</code> are specified, the module outputs a random date between the two timestamps. <code>''timestamp1''</code> must be earlier than <code>''timestamp2''</code>. * If only <code>''timestamp1''</code>is specified, the module outputs a random date between the [[Unix epoch]] (1 Jan 1970) and the timestamp. <code>''timestamp1''</code> must not be earlier than 1 Jan 1970. * Formatting can be specified with the {{para|format}} parameter. The default formatting is "hh:mm, DD Month YYYY (UTC)" (the same as the default Wikipedia timestamp). * The timestamps and the {{para|format}} parameter accept values compatible with the [[mw:Help:Extension:ParserFunctions##time|#time parser function]]. Please see the #time documentation for the full range of possible input values and formatting options. * If the {{para|same}} parameter is set to "yes", "y", "true", or "1", the same date is returned for each module call on a given page. '''Examples''' <small>({{purge|refresh|anchor=Date}})</small> * <code><nowiki>{{#invoke:random|date}}</nowiki></code> → {{#invoke:random|date}} * <code><nowiki>{{#invoke:random|date|format=F j}}</nowiki></code> → {{#invoke:random|date|format=F j}} * <code><nowiki>{{#invoke:random|date|1 Jan 1980|31 Dec 1999}}</nowiki></code> → {{#invoke:random|date|1 Jan 1980|31 Dec 1999}} * <code><nowiki>{{#invoke:random|date|1st January 1500|1st January 3000|format=g:i a, l d M Y}}</nowiki></code> → {{#invoke:random|date|1st January 1500|1st January 3000|format=g:i a, l d M Y}} * <code><nowiki>{{#invoke:random|date|1970/06/01}}</nowiki></code> → {{#invoke:random|date|1970/06/01}} * <code><nowiki>{{#invoke:random|date|same=yes}}</nowiki></code> → {{#invoke:random|date|same=yes}} * <code><nowiki>{{#invoke:random|date|same=yes}}</nowiki></code> → {{#invoke:random|date|same=yes}}
Summary:
Please note that all contributions to Thetacola Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Project:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Module
Discussion
Read
Edit source
History
Page actions
Module
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Tools
What links here
Related changes
Special pages
Page information