diff options
| author | Jannis Leidel <jannis@leidel.info> | 2009-12-22 17:58:49 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2009-12-22 17:58:49 +0000 |
| commit | 9233d0426537615e06b78d28010d17d5a66adf44 (patch) | |
| tree | 5c731977b3ef9bd1e660b63c4edf6caa7b6491ad /docs/ref/templates | |
| parent | 6632739e94c6c38b4c5a86cf5c80c48ae50ac49f (diff) | |
Fixed #7980 - Improved i18n framework to support locale aware formatting (dates and numbers) and form processing.
Thanks to Marc Garcia for working on this during his Google Summer of Code 2009!
Additionally fixes #1061, #2203, #3940, #5526, #6449, #6231, #6693, #6783, #9366 and #10891.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11964 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref/templates')
| -rw-r--r-- | docs/ref/templates/builtins.txt | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index bf2d9e899c..b7afa15f7f 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -1047,7 +1047,12 @@ If ``value`` is ``"String with spaces"``, the output will be ``"Stringwithspaces date ~~~~ -Formats a date according to the given format (same as the `now`_ tag). +Formats a date according to the given format. + +Given format can be one of the predefined ones ``DATE_FORMAT``, +``DATETIME_FORMAT``, ``SHORT_DATE_FORMAT`` or ``SHORT_DATETIME_FORMAT``, +or a custom format, same as the `now`_ tag. Note that predefined formats may +vary depending on the current locale. For example:: @@ -1062,7 +1067,7 @@ When used without a format string:: {{ value|date }} ...the formatting string defined in the :setting:`DATE_FORMAT` setting will be -used. +used, without applying any localization. .. templatefilter:: default @@ -1610,7 +1615,11 @@ output will be ``"Joel is a slug"``. time ~~~~ -Formats a time according to the given format (same as the `now`_ tag). +Formats a time according to the given format. + +Given format can be the predefined one ``TIME_FORMAT``, or a custom format, +same as the `now`_ tag. Note that the predefined format is locale depending. + The time filter will only accept parameters in the format string that relate to the time of day, not the date (for obvious reasons). If you need to format a date, use the `date`_ filter. @@ -1627,7 +1636,7 @@ When used without a format string:: {{ value|time }} ...the formatting string defined in the :setting:`TIME_FORMAT` setting will be -used. +used, without aplying any localization. .. templatefilter:: timesince |
