# Adapted from http://delete.me.uk/2005/03/iso8601.html
# Note: This regex ensures that all ISO8601 timezone formats are accepted - but, due to legacy support for other timestrings, not all incorrect formats can be rejected.
...
...
@@ -1495,6 +1494,7 @@ _converters = {}
forcalendarin_calendars:
_converters[calendar]=utime("seconds since 1-1-1",calendar)
@cython.embedsignature(True)
cdefclassdatetime(object):
"""
The base class implementing most methods of datetime classes that
...
...
@@ -1533,12 +1533,17 @@ Gregorial calendar.
return'%Y-%m-%d %H:%M:%S'
defstrftime(self,format=None):
"""
Return a string representing the date, controlled by an explicit format
string. For a complete list of formatting directives, see section
'strftime() and strptime() Behavior' in the base Python documentation.
- `numpy <http://www.numpy.org/>`__ (1.7 or later)
Instructions
------------
The easiest way to get everything installed is to use conda_ command line tool::
$ conda install cftime
.. _conda: http://conda.io/
We recommend using the community maintained `conda-forge <https://conda-forge.github.io/>`__ channel if you need difficult\-to\-build dependencies such as cartopy or pynio::
$ conda install -c conda-forge cftime
New releases may also appear in conda-forge before being updated in the default
channel.
If you don't use conda, be sure you have the required dependencies (numpy and
cython) installed first. Then, install cftime with pip::
$ pip install cftime
Developing
----------
When developing we recommend cloning the GitHub repository,
building the extension in-place with `cython <http://cython.org/>`__ 0.19 or later
``python setup.py build_ext --inplace``
and running the test suite to check if the changes are passing the tests