summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorxmo-odoo <xmo@odoo.com>2018-01-26 11:14:57 +0100
committerGitHub <noreply@github.com>2018-01-26 11:14:57 +0100
commit57832c6e3d3b6513d66a3825de9bf537bb07be17 (patch)
treeb318861459b2f76469e3840a375a234713baa2f2 /docs
parentd72eb13d027ae9f8813c335974a6c2198320161f (diff)
downloadbabel-57832c6e3d3b6513d66a3825de9bf537bb07be17.tar.gz
Add explicit signatures to some date autofunctions
Because default_locale is eager, it generates misleading documentation when built (including on the site) as the doc will show the LC_TIME for the machine which built the doc. An explicit autofunction signature fixes that and provides a more correct view of the signature. An alternative fix would be for the LC_TIME value in the module to be a custom object with a repr of LC_TIME or something along those lines. Fixes #542
Diffstat (limited to 'docs')
-rw-r--r--docs/api/dates.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/api/dates.rst b/docs/api/dates.rst
index 0fa9f1f..f3e59b6 100644
--- a/docs/api/dates.rst
+++ b/docs/api/dates.rst
@@ -9,17 +9,17 @@ Python `datetime`, `date` and `time` objects and work with timezones.
Date and Time Formatting
------------------------
-.. autofunction:: format_datetime
+.. autofunction:: format_datetime(datetime=None, format='medium', tzinfo=None, locale=default_locale('LC_TIME'))
-.. autofunction:: format_date
+.. autofunction:: format_date(date=None, format='medium', locale=default_locale('LC_TIME'))
-.. autofunction:: format_time
+.. autofunction:: format_time(time=None, format='medium', tzinfo=None, locale=default_locale('LC_TIME'))
-.. autofunction:: format_timedelta
+.. autofunction:: format_timedelta(delta, granularity='second', threshold=.85, add_direction=False, format='long', locale=default_locale('LC_TIME'))
-.. autofunction:: format_skeleton
+.. autofunction:: format_skeleton(skeleton, datetime=None, tzinfo=None, fuzzy=True, locale=default_locale('LC_TIME'))
-.. autofunction:: format_interval
+.. autofunction:: format_interval(start, end, skeleton=None, tzinfo=None, fuzzy=True, locale=default_locale('LC_TIME'))
Timezone Functionality
----------------------