<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="mysql-calendar">
      </a>
      13.2.7 What Calendar Is Used By MySQL?
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045213253312">
  </a>
  <p>
   MySQL uses what is known as a
   <span class="firstterm">
    proleptic Gregorian
        calendar
   </span>
   .
  </p>
  <p>
   Every country that has switched from the Julian to the Gregorian
        calendar has had to discard at least ten days during the switch.
        To see how this works, consider the month of October 1582, when
        the first Julian-to-Gregorian switch occurred.
  </p>
  <div class="informaltable">
   <table summary="The month of October 1582, when the first Julian-to-Gregorian switch occurred. Table headings are days of the week and table rows list the dates for each day of the week. The table is intended to illustrate that there are no dates between October 4 and October 15.">
    <colgroup>
     <col style="width: 14%"/>
     <col style="width: 14%"/>
     <col style="width: 14%"/>
     <col style="width: 14%"/>
     <col style="width: 14%"/>
     <col style="width: 14%"/>
     <col style="width: 14%"/>
    </colgroup>
    <thead>
     <tr>
      <th scope="col">
       Monday
      </th>
      <th scope="col">
       Tuesday
      </th>
      <th scope="col">
       Wednesday
      </th>
      <th scope="col">
       Thursday
      </th>
      <th scope="col">
       Friday
      </th>
      <th scope="col">
       Saturday
      </th>
      <th scope="col">
       Sunday
      </th>
     </tr>
    </thead>
    <tbody>
     <tr>
      <th scope="row">
       1
      </th>
      <td>
       2
      </td>
      <td>
       3
      </td>
      <td>
       4
      </td>
      <td>
       15
      </td>
      <td>
       16
      </td>
      <td>
       17
      </td>
     </tr>
     <tr>
      <th scope="row">
       18
      </th>
      <td>
       19
      </td>
      <td>
       20
      </td>
      <td>
       21
      </td>
      <td>
       22
      </td>
      <td>
       23
      </td>
      <td>
       24
      </td>
     </tr>
     <tr>
      <th scope="row">
       25
      </th>
      <td>
       26
      </td>
      <td>
       27
      </td>
      <td>
       28
      </td>
      <td>
       29
      </td>
      <td>
       30
      </td>
      <td>
       31
      </td>
     </tr>
    </tbody>
   </table>
  </div>
  <p>
   There are no dates between October 4 and October 15. This
        discontinuity is called the
   <span class="firstterm">
    cutover
   </span>
   . Any dates before
        the cutover are Julian, and any dates following the cutover are
        Gregorian. Dates during a cutover are nonexistent.
  </p>
  <p>
   A calendar applied to dates when it was not actually in use is
        called
   <span class="firstterm">
    proleptic
   </span>
   . Thus, if
        we assume there was never a cutover and Gregorian rules always
        rule, we have a proleptic Gregorian calendar. This is what is
        used by MySQL, as is required by standard SQL. For this reason,
        dates prior to the cutover stored as MySQL
   <a class="link" href="datetime.html" title="13.2.2 The DATE, DATETIME, and TIMESTAMP Types">
    <code class="literal">
     DATE
    </code>
   </a>
   or
   <a class="link" href="datetime.html" title="13.2.2 The DATE, DATETIME, and TIMESTAMP Types">
    <code class="literal">
     DATETIME
    </code>
   </a>
   values must be adjusted
        to compensate for the difference. It is important to realize
        that the cutover did not occur at the same time in all
        countries, and that the later it happened, the more days were
        lost. For example, in Great Britain, it took place in 1752, when
        Wednesday September 2 was followed by Thursday September 14.
        Russia remained on the Julian calendar until 1918, losing 13
        days in the process, and what is popularly referred to as its
   <span class="quote">
    “
    <span class="quote">
     October Revolution
    </span>
    ”
   </span>
   occurred in November according
        to the Gregorian calendar.
  </p>
 </div>
 <br/>
</div>
