Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed ReST bug in templates.txt

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit bd0d8a779e90ae2f8c01fbf26133d13760903552 1 parent eb590d8
Adrian Holovaty authored November 06, 2005

Showing 1 changed file with 58 additions and 58 deletions. Show diff stats Hide diff stats

  1. 116  docs/templates.txt
116  docs/templates.txt
@@ -509,64 +509,64 @@ with some custom extensions.
509 509
 
510 510
 Available format strings:
511 511
 
512  
-================  ========================================  =====================
513  
-Format character  Description                               Example output
514  
-================  ========================================  =====================
515  
-a                 ``'a.m.'`` or ``'p.m.'`` (Note that       ``'a.m.'``
516  
-                    this is slightly different than PHP's
517  
-                    output, because this includes periods
518  
-                    to match Associated Press style.)
519  
-A                 ``'AM'`` or ``'PM'``.                     ``'AM'``
520  
-B                 Not implemented.
521  
-d                 Day of the month, 2 digits with           ``'01'`` to ``'31'``
522  
-                    leading zeros.
523  
-D                 Day of the week, textual, 3 letters.      ``'Fri'``
524  
-f                 Time, in 12-hour hours and minutes,       ``'1'``, ``'1:30'``
525  
-                    with minutes left off if they're zero.
526  
-                    Proprietary extension.
527  
-F                 Month, textual, long.                     ``'January'``
528  
-g                 Hour, 12-hour format without leading      ``'1'`` to ``'12'``
529  
-                    zeros.
530  
-G                 Hour, 24-hour format without leading      ``'0'`` to ``'23'``
531  
-                    zeros.
532  
-h                 Hour, 12-hour format.                     ``'01'`` to ``'12'``
533  
-H                 Hour, 24-hour format.                     ``'00'`` to ``'23'``
534  
-i                 Minutes.                                  ``'00'`` to ``'59'``
535  
-I                 Not implemented.
536  
-j                 Day of the month without leading          ``'1'`` to ``'31'``
537  
-                    zeros.
538  
-l                 Day of the week, textual, long.           ``'Friday'``
539  
-L                 Boolean for whether it's a leap year.     ``True`` or ``False``
540  
-m                 Month, 2 digits with leading zeros.       ``'01'`` to ``'12'``
541  
-M                 Month, textual, 3 letters.                ``'Jan'``
542  
-n                 Month without leading zeros.              ``'1'`` to ``'12'``
543  
-N                 Month abbreviation in Associated Press    ``'Jan.'``, ``'Feb.'``, ``'March'``, ``'May'``
544  
-                    style. Proprietary extension.
545  
-O                 Difference to Greenwich time in hours.    ``'+0200'``
546  
-P                 Time, in 12-hour hours, minutes and       ``'1 a.m.'``, ``'1:30 p.m.'``, ``'midnight'``, ``'noon'``, ``'12:30 p.m.'``
547  
-                    'a.m.'/'p.m.', with minutes left off
548  
-                    if they're zero and the special-case
549  
-                    strings 'midnight' and 'noon' if
550  
-                    appropriate. Proprietary extension.
551  
-r                 RFC 822 formatted date.                   ``'Thu, 21 Dec 2000 16:01:07 +0200'``
552  
-s                 Seconds, 2 digits with leading zeros.     ``'00'`` to ``'59'``
553  
-S                 English ordinal suffix for day of the     ``'st'``, ``'nd'``, ``'rd'`` or ``'th'``
554  
-                    month, 2 characters.
555  
-t                 Not implemented.
556  
-T                 Time zone of this machine.                ``'EST'``, ``'MDT'``
557  
-U                 Not implemented.
558  
-w                 Day of the week, digits without           ``'0'`` (Sunday) to ``'6'`` (Saturday)
559  
-                    leading zeros.
560  
-W                 ISO-8601 week number of year, with        ``1``, ``23``
561  
-                    weeks starting on Monday.
562  
-y                 Year, 2 digits.                           ``'99'``
563  
-Y                 Year, 4 digits.                           ``'1999'``
564  
-z                 Day of the year.                          ``0`` to ``365``
565  
-Z                 Time zone offset in seconds. The          ``-43200`` to ``43200``
566  
-                    offset for timezones west of UTC is
567  
-                    always negative, and for those east of
568  
-                    UTC is always positive.
569  
-================  ========================================  =====================
  512
+    ================  ========================================  =====================
  513
+    Format character  Description                               Example output
  514
+    ================  ========================================  =====================
  515
+    a                 ``'a.m.'`` or ``'p.m.'`` (Note that       ``'a.m.'``
  516
+                        this is slightly different than PHP's
  517
+                        output, because this includes periods
  518
+                        to match Associated Press style.)
  519
+    A                 ``'AM'`` or ``'PM'``.                     ``'AM'``
  520
+    B                 Not implemented.
  521
+    d                 Day of the month, 2 digits with           ``'01'`` to ``'31'``
  522
+                        leading zeros.
  523
+    D                 Day of the week, textual, 3 letters.      ``'Fri'``
  524
+    f                 Time, in 12-hour hours and minutes,       ``'1'``, ``'1:30'``
  525
+                        with minutes left off if they're zero.
  526
+                        Proprietary extension.
  527
+    F                 Month, textual, long.                     ``'January'``
  528
+    g                 Hour, 12-hour format without leading      ``'1'`` to ``'12'``
  529
+                        zeros.
  530
+    G                 Hour, 24-hour format without leading      ``'0'`` to ``'23'``
  531
+                        zeros.
  532
+    h                 Hour, 12-hour format.                     ``'01'`` to ``'12'``
  533
+    H                 Hour, 24-hour format.                     ``'00'`` to ``'23'``
  534
+    i                 Minutes.                                  ``'00'`` to ``'59'``
  535
+    I                 Not implemented.
  536
+    j                 Day of the month without leading          ``'1'`` to ``'31'``
  537
+                        zeros.
  538
+    l                 Day of the week, textual, long.           ``'Friday'``
  539
+    L                 Boolean for whether it's a leap year.     ``True`` or ``False``
  540
+    m                 Month, 2 digits with leading zeros.       ``'01'`` to ``'12'``
  541
+    M                 Month, textual, 3 letters.                ``'Jan'``
  542
+    n                 Month without leading zeros.              ``'1'`` to ``'12'``
  543
+    N                 Month abbreviation in Associated Press    ``'Jan.'``, ``'Feb.'``, ``'March'``, ``'May'``
  544
+                        style. Proprietary extension.
  545
+    O                 Difference to Greenwich time in hours.    ``'+0200'``
  546
+    P                 Time, in 12-hour hours, minutes and       ``'1 a.m.'``, ``'1:30 p.m.'``, ``'midnight'``, ``'noon'``, ``'12:30 p.m.'``
  547
+                        'a.m.'/'p.m.', with minutes left off
  548
+                        if they're zero and the special-case
  549
+                        strings 'midnight' and 'noon' if
  550
+                        appropriate. Proprietary extension.
  551
+    r                 RFC 822 formatted date.                   ``'Thu, 21 Dec 2000 16:01:07 +0200'``
  552
+    s                 Seconds, 2 digits with leading zeros.     ``'00'`` to ``'59'``
  553
+    S                 English ordinal suffix for day of the     ``'st'``, ``'nd'``, ``'rd'`` or ``'th'``
  554
+                        month, 2 characters.
  555
+    t                 Not implemented.
  556
+    T                 Time zone of this machine.                ``'EST'``, ``'MDT'``
  557
+    U                 Not implemented.
  558
+    w                 Day of the week, digits without           ``'0'`` (Sunday) to ``'6'`` (Saturday)
  559
+                        leading zeros.
  560
+    W                 ISO-8601 week number of year, with        ``1``, ``23``
  561
+                        weeks starting on Monday.
  562
+    y                 Year, 2 digits.                           ``'99'``
  563
+    Y                 Year, 4 digits.                           ``'1999'``
  564
+    z                 Day of the year.                          ``0`` to ``365``
  565
+    Z                 Time zone offset in seconds. The          ``-43200`` to ``43200``
  566
+                        offset for timezones west of UTC is
  567
+                        always negative, and for those east of
  568
+                        UTC is always positive.
  569
+    ================  ========================================  =====================
570 570
 
571 571
 Example::
572 572
 

0 notes on commit bd0d8a7

Please sign in to comment.
Something went wrong with that request. Please try again.