MCPcopy
hub / github.com/django/django / r

Method r

django/utils/dateformat.py:267–276  ·  view source on GitHub ↗

RFC 5322 formatted date; e.g. 'Thu, 21 Dec 2000 16:01:07 +0200

(self)

Source from the content-addressed store, hash-verified

265 return self.data.isocalendar().year
266
267 def r(self):
268 "RFC 5322 formatted date; e.g. 'Thu, 21 Dec 2000 16:01:07 +0200'"
269 value = self.data
270 if not isinstance(value, datetime):
271 # Assume midnight in default timezone if datetime.date provided.
272 default_timezone = get_default_timezone()
273 value = datetime.combine(value, time.min).replace(tzinfo=default_timezone)
274 elif is_naive(value):
275 value = make_aware(value, timezone=self.timezone)
276 return format_datetime_rfc5322(value)
277
278 def S(self):
279 """

Callers

nothing calls this directly

Calls 4

get_default_timezoneFunction · 0.90
is_naiveFunction · 0.90
make_awareFunction · 0.90
combineMethod · 0.80

Tested by

no test coverage detected