MCPcopy
hub / github.com/django/django / value

Method value

django/contrib/gis/gdal/field.py:176–182  ·  view source on GitHub ↗

Return a Python `date` object for the OFTDate field.

(self)

Source from the content-addressed store, hash-verified

174class OFTDate(Field):
175 @property
176 def value(self):
177 "Return a Python `date` object for the OFTDate field."
178 try:
179 yy, mm, dd, hh, mn, ss, tz = self.as_datetime()
180 return date(yy.value, mm.value, dd.value)
181 except (TypeError, ValueError, GDALException):
182 return None
183
184
185class OFTDateTime(Field):

Callers

nothing calls this directly

Calls 2

dateFunction · 0.85
as_datetimeMethod · 0.80

Tested by

no test coverage detected