Module:Date/doc: Difference between revisions

Content deleted Content added
Created page with "This module provides date functions for use by other modules. Dates in the Gregorian calendar and the Julian calendar are supported, from 9999 BCE to 9999 CE. The cale..."
 
No edit summary
Line 1:
This module provides date functions for use by other modules. Dates in the [[Wikipedia:Gregorian calendar|Gregorian calendar]] and the [[Wikipedia:Julian calendar|Julian calendar]] are supported, from 9999 BCE to 9999 CE. The calendars are proleptic—they are assumed to apply at all times with no irregularities.
 
A date, with an optional time, can be specified in a variety of formats, and can be converted for display using a variety of formats, for example, 1 April 2016 or April 1, 2016. The properties of a date include its [[Wikipedia:Julian day|Julian date]] and its Gregorian serial date, as well as the day-of-week and day-of-year.
 
Dates can be compared (for example, <code>date1 <= date2</code>), and can be used with add or subtract (for example, <code>date + '3 months'</code>). The difference between two dates can be determined with <code>date1 - date2</code>. These operations work with both Gregorian and Julian calendar dates, but <code>date1 - date2</code> is nil if the two dates use different calendars.
Line 19:
The following has examples of using the module:
*[[Module:Date/example]] • Demonstration showing how Module:Date may be used.
*[[Wikipedia:Module talk:Date/example]] • Output from the demonstration.
 
== Formatted output ==