mirror of https://github.com/django/django.git
Removed unused and undocumented gdal_release_date function
This commit is contained in:
parent
a1a5c0854f
commit
0ad6d7e612
|
@ -37,7 +37,7 @@
|
||||||
try:
|
try:
|
||||||
from django.contrib.gis.gdal.driver import Driver
|
from django.contrib.gis.gdal.driver import Driver
|
||||||
from django.contrib.gis.gdal.datasource import DataSource
|
from django.contrib.gis.gdal.datasource import DataSource
|
||||||
from django.contrib.gis.gdal.libgdal import gdal_version, gdal_full_version, gdal_release_date, GDAL_VERSION
|
from django.contrib.gis.gdal.libgdal import gdal_version, gdal_full_version, GDAL_VERSION
|
||||||
from django.contrib.gis.gdal.srs import SpatialReference, CoordTransform
|
from django.contrib.gis.gdal.srs import SpatialReference, CoordTransform
|
||||||
from django.contrib.gis.gdal.geometries import OGRGeometry
|
from django.contrib.gis.gdal.geometries import OGRGeometry
|
||||||
HAS_GDAL = True
|
HAS_GDAL = True
|
||||||
|
|
|
@ -73,19 +73,6 @@ def gdal_full_version():
|
||||||
"Returns the full GDAL version information."
|
"Returns the full GDAL version information."
|
||||||
return _version_info('')
|
return _version_info('')
|
||||||
|
|
||||||
def gdal_release_date(date=False):
|
|
||||||
"""
|
|
||||||
Returns the release date in a string format, e.g, "2007/06/27".
|
|
||||||
If the date keyword argument is set to True, a Python datetime object
|
|
||||||
will be returned instead.
|
|
||||||
"""
|
|
||||||
from datetime import date as date_type
|
|
||||||
rel = _version_info('RELEASE_DATE')
|
|
||||||
yy, mm, dd = map(int, (rel[0:4], rel[4:6], rel[6:8]))
|
|
||||||
d = date_type(yy, mm, dd)
|
|
||||||
if date: return d
|
|
||||||
else: return d.strftime('%Y/%m/%d')
|
|
||||||
|
|
||||||
version_regex = re.compile(r'^(?P<major>\d+)\.(?P<minor>\d+)(\.(?P<subminor>\d+))?')
|
version_regex = re.compile(r'^(?P<major>\d+)\.(?P<minor>\d+)(\.(?P<subminor>\d+))?')
|
||||||
def gdal_version_info():
|
def gdal_version_info():
|
||||||
ver = gdal_version().decode()
|
ver = gdal_version().decode()
|
||||||
|
|
Loading…
Reference in New Issue