Template:J2G/documentation

Usage
This template converts a Julian calendar date to a date in the Gregorian calendar. It can be used, for example, to display the Gregorian date of a work that is dated according to the Julian calendar in a quotation template.

In Britain and the British Empire (including the eastern part of what is now the United States), the Gregorian calendar was adopted with effect from 3 September 1752 (Julian calendar) or 14 September 1752 (Gregorian). Thus, it is most likely unnecessary to use this template for dates of works published from that date onwards. For the years when other territories adopted the calendar, see "Gregorian calendar" and "Adoption of the Gregorian calendar".

The template takes only one parameter: 1 or date, which is the Julian calendar date to be converted.

To determine the number of days that a Gregorian date is ahead of a Julian date, called the "secular difference" between the two calendars, the template uses the following formula:


 * $$D = \left\lfloor{Y/100}\right\rfloor - \left\lfloor{Y/400}\right\rfloor - 2$$

In the formula, $$D$$ is the secular difference and $$Y$$ is the year using. $$\left\lfloor{x}\right\rfloor$$ means that if the result of the division is not an integer it is rounded down to the nearest integer. See "Gregorian calendar".

Examples

 * Wikitext:
 * (start of the ); or
 * Result:
 * Result:


 * Wikitext:
 * Result:
 * Comment: The trial was held on 27 January 1605 according to the Julian calendar. By using, the quotation template is directed to display the Gregorian calendar date (6 February 1603) as the date of the work.
 * Comment: The trial was held on 27 January 1605 according to the Julian calendar. By using, the quotation template is directed to display the Gregorian calendar date (6 February 1603) as the date of the work.