{% extends "admin/change_form.html" %}
{% load i18n admin_modify admin_urls %}{% load url from aa_compat %}
{% block extrahead %}{{ block.super }}
<style type="text/css">
  #form {
    float: left;
    width: 40%;
  }

  #legend {
    float: left;
    width: 60%;
  }
</style>
{% url 'adminactions.format_date' as url_format_date %}
{% if url_format_date %}
<script type="text/javascript">
  (function ($) {
    $(document).ready(function ($) {
      var _url = "{{ url_format_date }}";
      var get_format = function (sender) {
        $.get(_url, {'fmt': $(sender).val()},
          function (data) {
            $(sender).next('.sample').html(data);
          }
        );
      };
      $('#id_datetime_format, #id_date_format, #id_time_format').after('&nbsp;&nbsp;<span class="sample"></span>').keyup(function () {
        clearTimeout($(this).data('timer'));
        var target = $(this);
        var wait = setTimeout(function () {
          get_format(target)
        }, 500);
        $(this).data('timer', wait);
      }).trigger('keyup');
    });
  })(django.jQuery);

</script>
{% endif %}
{% endblock %}

{% block breadcrumbs %}{% if not is_popup %}
<div class="breadcrumbs">
  <a href="{% url 'admin:index' %}">{% trans "Home" %}</a> &rsaquo;
  <a href="{% url 'admin:index' %}{{ app_label}}">{{ app_label|capfirst }}</a> &rsaquo;
  {% if has_change_permission %}<a
  href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %} &rsaquo;
  {{ action_short_description|capfirst }}
</div>
{% endif %}{% endblock %}

{% block content %}
{% if adminform.form.subject.errors %}
<ol>
  {% for error in adminform.form.subject.errors %}
  <li><strong>{{ error|escape }}</strong></li>
  {% endfor %}
</ol>
{% endif %}
<div id='form'>
  <form action="" method="post">
    {% csrf_token %}
    <table>
      {{ adminform.form }}
    </table>
    <input style="margin: 5px;" type="submit" name="apply" value="{% trans 'Export' %}"/>
  </form>
</div>
{% url 'adminactions.format_date' as url_format_date %}
{% if url_format_date %}
<div id='legend-date'>
  <table xmlns="http://www.w3.org/1999/xhtml" lass="doctable table">

    <thead valign="middle">
    <tr valign="middle">
      <th><i></i>{% trans "character" %}</th>

      <th>{% trans "Description" %}</th>
      <th>{% trans "Example returned values" %}</th>
    </tr>

    </thead>

    <tbody valign="middle" class="tbody">
    <tr valign="middle">
      <td align="center"><em class="emphasis">{% trans "Day" %}</em></td>

      <td align="left">---</td>
      <td align="left">---</td>
    </tr>

    <tr valign="middle">
      <td align="left"><i>d</i></td>
      <td align="left">{% trans "Day of the month, 2 digits with leading zeros" %}</td>

      <td align="left"><i>01</i> {% trans "to" %} <i>31</i></td>
    </tr>

    <tr valign="middle">
      <td align="left"><i>D</i></td>
      <td align="left">{% trans "A textual representation of a day, three letters" %}</td>

      <td align="left"><i>{% trans "Mon" %}</i>{% trans "through" %}<i>{% trans "Sun" %}</i></td>
    </tr>

    <tr valign="middle">
      <td align="left"><i>j</i></td>
      <td align="left">{% trans "Day of the month without leading zeros" %}</td>

      <td align="left"><i>1</i> {% trans "to" %}<i>31</i></td>
    </tr>

    <tr valign="middle">
      <td align="left"><i>l</i> (lowercase 'L')</td>
      <td align="left">{% trans "A full textual representation of the day of the week" %}</td>

      <td align="left"><i>{% trans "Sunday" %}</i>{% trans "through" %}<i>{% trans "Saturday" %}</i></td>
    </tr>
    <tr>
      <td align="left"><i>1</i>{% trans "for Monday through" %}<i>7</i>{% trans "for Sunday"%}</td>
    </tr>

    <tr valign="middle">
      <td align="left"><i>S</i></td>
      <td align="left">{% trans "English ordinal suffix for the day of the month, 2 characters" %}</td>

      <td align="left">
        <i>st</i>, <i>nd</i>, <i>rd</i> or
        <i>th</i>.{% trans "Works well with" %} <i>j</i>
      </td>
    </tr>

    <tr valign="middle">
      <td align="left"><i>w</i></td>
      <td align="left">{% trans "Numeric representation of the day of the week" %}</td>
      <td align="left"><i>0</i>{% trans "(for Sunday) through" %}<i>6</i>{% trans "(for Saturday)" %}</td>

    </tr>

    <tr valign="middle">
      <td align="left"><i>z</i></td>
      <td align="left">{% trans "The day of the year (starting from 0)" %}</td>
      <td align="left"><i>0</i>{% trans "through" %}<i>365</i></td>

    </tr>

    <tr valign="middle">
      <td align="center"><em class="emphasis">{% trans "Week" %}</em></td>
      <td align="left">---</td>
      <td align="left">---</td>
    </tr>

    <tr valign="middle">
      <td align="left"><i>W</i></td>
      <td align="left">{% trans "ISO-8601 week number of year, weeks starting on Monday (added in PHP 4.1.0)"%}</td>
      <td align="left">{% trans "Example:" %} <i>42</i> {% trans "(the 42nd week in the year)" %}</td>
    </tr>

    <tr valign="middle">
      <td align="center"><em class="emphasis">{% trans "Month" %}</em></td>
      <td align="left">---</td>
      <td align="left">---</td>
    </tr>

    <tr valign="middle">
      <td align="left"><i>F</i></td>

      <td align="left">{% trans "A full textual representation of a month, such as January or March" %}</td>
      <td align="left"><i>{% trans "January" %}</i> {% trans "through" %}<i>{% trans "December" %}</i></td>
    </tr>

    <tr valign="middle">
      <td align="left"><i>m</i></td>

      <td align="left">{% trans "Numeric representation of a month, with leading zeros" %}</td>
      <td align="left"><i>01</i>{% trans " through" %} <i>12</i></td>
    </tr>

    <tr valign="middle">
      <td align="left"><i>M</i></td>

      <td align="left">{% trans "A short textual representation of a month, three letters" %}</td>
      <td align="left"><i>{% trans "Jan" %}</i>{% trans " through" %}<i>{% trans "Dec" %}</i></td>
    </tr>

    <tr valign="middle">
      <td align="left"><i>n</i></td>

      <td align="left">{% trans "Numeric representation of a month, without leading zeros" %}</td>
      <td align="left"><i>1</i>{% trans " through" %}<i>12</i></td>
    </tr>

    <tr valign="middle">
      <td align="left"><i>t</i></td>

      <td align="left">{% trans "Number of days in the given month" %}</td>
      <td align="left"><i>28</i>{% trans " through" %} <i>31</i></td>
    </tr>

    <tr valign="middle">
      <td align="center"><em class="emphasis">{% trans "Year" %}</em></td>

      <td align="left">---</td>
      <td align="left">---</td>
    </tr>

    <tr valign="middle">
      <td align="left"><i>L</i></td>
      <td align="left">{% trans "Whether it's a leap year"%}</td>

      <td align="left"><i>1</i>{% trans " if it is a leap year, "%}<i>0</i> {% trans "otherwise."%}</td>
    </tr>

    <td align="left">{% trans "Examples:" %}<i>{% trans "1999" %}</i>{% trans " or" %} <i>{% trans "2003" %}</i></td>
    </tr>

    <tr valign="middle">
      <td align="left"><i>Y</i></td>
      <td align="left">{% trans "A full numeric representation of a year, 4 digits"%}</td>

      <td align="left">{% trans "Examples: "%}<i>{% trans "1999"%}</i> {% trans "or" %} <i>2003</i></td>
    </tr>

    <tr valign="middle">
      <td align="left"><i>y</i></td>
      <td align="left">{% trans "A two digit representation of a year" %}</td>

      <td align="left">{% trans "Examples: <i>99</i> or <i>03</i></td>
    </tr>

    <tr valign="middle">
      <td align="center"><em class="emphasis">{% trans "Time" %}</em></td>
      <td align="left">---</td>

      <td align="left">---</td>
    </tr>

    <tr valign="middle">
      <td align="left"><i>a</i></td>
      <td align="left">{% trans "Lowercase Ante meridiem and Post meridiem" %}</td>
      <td align="left"><i>am</i> {% trans "or " %}<i>pm</i></td>

    </tr>

    <tr valign="middle">
      <td align="left"><i>A</i></td>
      <td align="left">{% trans "Uppercase Ante meridiem and Post meridiem" %}</td>
      <td align="left"><i>AM</i>{% trans " or " %}<i>PM</i></td>

    </tr>

    <tr valign="middle">
      <td align="left"><i>B</i></td>
      <td align="left">{% trans "Swatch Internet time" %}</td>
      <td align="left"><i>000</i>{% trans " through " %}<i>999</i></td>

    </tr>

    <tr valign="middle">
      <td align="left"><i>g</i></td>
      <td align="left">{% trans "12-hour format of an hour without leading zeros" %}</td>
      <td align="left"><i>1</i>{% trans " through " %}<i>12</i></td>

    </tr>

    <tr valign="middle">
      <td align="left"><i>G</i></td>
      <td align="left">{% trans "24-hour format of an hour without leading zeros" %}</td>
      <td align="left"><i>0</i>{% trans " through " %}<i>23</i></td>

    </tr>

    <tr valign="middle">
      <td align="left"><i>h</i></td>
      <td align="left">{% trans "12-hour format of an hour with leading zeros" %}</td>
      <td align="left"><i>01</i>{% trans " through " %}<i>12</i></td>

    </tr>

    <tr valign="middle">
      <td align="left"><i>H</i></td>
      <td align="left">{% trans "24-hour format of an hour with leading zeros" %}</td>
      <td align="left"><i>00</i>{% trans " through " %}<i>23</i></td>

    </tr>

    <tr valign="middle">
      <td align="left"><i>i</i></td>
      <td align="left">{% trans "Minutes with leading zeros" %}</td>
      <td align="left"><i>00</i>{% trans " to " %}<i>59</i></td>

    </tr>

    <tr valign="middle">
      <td align="left"><i>s</i></td>
      <td align="left">{% trans "Seconds, with leading zeros" %}</td>
      <td align="left"><i>00</i>{% trans " through" %} <i>59</i></td>

    </tr>

    <tr valign="middle">
      <td align="center"><em class="emphasis">{% trans "Timezone" %}</em></td>
      <td align="left">---</td>
      <td align="left">---</td>
    </tr>

    <tr valign="middle">
      <td align="left"><i>I</i>{% trans " (capital i)" %}</td>
      <td align="left">{% trans "Whether or not the date is in daylight saving time" %}</td>
      <td align="left"><i>1</i>{% trans " if Daylight Saving Time, <i>0</i> otherwise." %}</td>

    </tr>

    <tr valign="middle">
      <td align="left"><i>O</i></td>
      <td align="left">{% trans "Difference to Greenwich time (GMT) in hours" %}</td>
      <td align="left">{% trans "Example: " %}<i>+0200</i></td>
    </tr>

    <tr valign="middle">

      <td align="left"><i>T</i></td>
      <td align="left">{% trans "Timezone abbreviation" %}</td>
      <td align="left">{% trans "Examples: " %}<i>EST</i>, <i>MDT</i> ...</td>
    </tr>

    <tr valign="middle">
      <td align="left"><i>Z</i></td>
      <td align="left">{% trans "Timezone offset in seconds. The offset for timezones west of UTC is always negative, and for those east of UTC is always positive." %}
      </td>
      <td align="left"><i>-43200</i>{% trans "through " %}<i>50400</i></td>
    </tr>

    <tr valign="middle">
      <td align="center"><em class="emphasis">{% trans "Full Date/Time" %}</em></td>
      <td align="left">---</td>
      <td align="left">---</td>
    </tr>

    <tr valign="middle">
      <td align="left"><i>r</i></td>
      <td align="left"><a class="link external" href="http://www.faqs.org/rfcs/rfc2822">» RFC 2822</a>{% trans "formatted date" %}
      </td>

      <td align="left">{% trans "Example: " %}<i>{% trans "Thu, 21 Dec 2000 16:01:07 +0200" %}</i></td>
    </tr>

    <tr valign="middle">
      <td align="left"><i>U</i></td>
      <td align="left">{% trans "Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)" %}</td>
      <td align="left">{% trans "See also" %} <span class="function"><a class="function" href="function.time.php">time()</a></span>
      </td>

    </tr>

    </tbody>

  </table>

</div>
{% endif  %}
{% endblock %}
