Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
c1e7723
add support for astronomical year numbering for real-world calendars
Mar 9, 2021
90a10b5
fix leap year and day of month functions to handle year zero correctly
jswhit Mar 9, 2021
0cfaa41
make sure has_year_zero propagated everywhere
jswhit Mar 9, 2021
7649b92
update docstrings, have date2num determine has_year_zero from inputs …
jswhit Mar 9, 2021
b90dbc9
have date2index use calendar and has_year_zero from inputs by default
jswhit Mar 9, 2021
c4cf2ab
fix date2index determination of calendar, has_year_zero
jswhit Mar 9, 2021
5b48e2a
fix date2index test
jswhit Mar 9, 2021
0967c9c
bump version number, add Changelog entry
jswhit Mar 9, 2021
469a742
update
jswhit Mar 9, 2021
cd4d8af
add more tests for has_year_zero
jswhit Mar 9, 2021
6207b75
abstract setting of calendar specific defaults for has_year_zero (to …
jswhit Mar 9, 2021
58da7b6
update
jswhit Mar 9, 2021
9894ee6
update test
Mar 10, 2021
20b41a6
update
Mar 10, 2021
97c1caa
update
jswhit Mar 10, 2021
b1bfe48
raise exception when comparing or subtracting cftime.datetime instanc…
jswhit Mar 12, 2021
ce9ade6
fix docstring typo
Mar 12, 2021
7f3d9f5
update fromordinal docstring
Mar 12, 2021
bcd0a6e
update docstring
Mar 12, 2021
d3b0d4a
update docstrings
jswhit Mar 12, 2021
6386f3c
update docstring
jswhit Mar 12, 2021
5fa484d
update docs
Mar 13, 2021
b23cb13
update docstring
Mar 14, 2021
9a39e73
change default for proleptic_gregorian to has_year_zero=True
Mar 14, 2021
44a51ae
fix docstring formatting
Mar 14, 2021
06d0589
update docs
Mar 14, 2021
28ff130
update
Mar 15, 2021
ee7fd2f
add warning if date prohibited by CF
Mar 15, 2021
1825530
remove superfluous warnings
Mar 15, 2021
95cf006
update
Mar 15, 2021
f7d88bd
suppress CFWarning in fromordinal
Mar 15, 2021
d69ac58
expose CFWarning
Mar 15, 2021
0665ca5
update
jswhit Mar 15, 2021
0842720
change how has_year_zero defaults are handled in num2date/date2num
jswhit Mar 15, 2021
68fa339
suppress noisy warnings
jswhit Mar 15, 2021
b30114b
update
jswhit Mar 15, 2021
53933c0
fix failing test
jswhit Mar 15, 2021
a4ab960
update docstring
jswhit Mar 15, 2021
e273d29
fix CF compatibility warning
jswhit Mar 15, 2021
2af7a2f
update
jswhit Mar 15, 2021
3cc6381
remove min year limit for real-world calendars
jswhit Mar 16, 2021
b33cc71
add change_calendar method, use it to compare datetime instances with…
jswhit Mar 17, 2021
c0ab8fb
remove warnings
jswhit Mar 17, 2021
1f2e090
restore default behavior (don't change proleptic gregorian to has_yea…
jswhit Mar 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
since version 1.4.1
===================
* clean-up deprecated calendar specific subclasses.
version 1.5.0 (not yet released)
=====================================
* clean-up deprecated calendar specific subclasses (PR #231).
* added string formatting support to `cftime.datetime` objects
(via `cftime.datetime.__format__`) PR #232.
* add support for astronomical year numbering (including year zero) for
real-world calendars using 'has_year_zero' cftime.datetime kwarg (PR #234).
Default is False for 'real-world' calendars and True
for idealized calendars.
* PR #234 also added "change_calendar" cftime.datetime method to switch to another
'real-world' calendar. Enables comparison of cftime.datetime instances
with different 'real-world' calendars.

version 1.4.1 (release tag v1.4.1.rel)
======================================
Expand Down
Binary file modified docs/_build/doctrees/api.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/installing.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_build/html/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/_static/doctools.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for all documentation.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/_static/language_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* This script contains the language-specific data used by searchtools.js,
* namely the list of stopwords, stemmer, scorer and splitter.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/_static/pygments.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pre { line-height: 125%; margin: 0; }
pre { line-height: 125%; }
td.linenos pre { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; }
span.linenos { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; }
td.linenos pre.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/_static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for the full-text search.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down
86 changes: 69 additions & 17 deletions docs/_build/html/api.html

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions docs/_build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<link rel="index" title="Index" href="#" />
<link rel="search" title="Search" href="search.html" />

Expand Down Expand Up @@ -57,6 +56,10 @@ <h2 id="C">C</h2>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="api.html#cftime.datetime.change_calendar">change_calendar() (cftime.datetime method)</a>
</li>
</ul></td>
</tr></table>

<h2 id="D">D</h2>
Expand Down Expand Up @@ -200,7 +203,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2018, Jeff Whitaker.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.3.1</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.4.3</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>

</div>
Expand Down
3 changes: 1 addition & 2 deletions docs/_build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Installation" href="installing.html" />
Expand Down Expand Up @@ -116,7 +115,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2018, Jeff Whitaker.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.3.1</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.4.3</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>

|
Expand Down
3 changes: 1 addition & 2 deletions docs/_build/html/installing.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="API" href="api.html" />
Expand Down Expand Up @@ -132,7 +131,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2018, Jeff Whitaker.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.3.1</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.4.3</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>

|
Expand Down
Binary file modified docs/_build/html/objects.inv
Binary file not shown.
3 changes: 1 addition & 2 deletions docs/_build/html/py-modindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />

Expand Down Expand Up @@ -111,7 +110,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2018, Jeff Whitaker.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.3.1</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.4.3</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>

</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/_build/html/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script src="_static/searchtools.js"></script>
<script src="_static/language_data.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="#" />
<script src="searchindex.js" defer></script>
Expand Down Expand Up @@ -102,7 +102,7 @@ <h3>Related Topics</h3>
&copy;2018, Jeff Whitaker.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.3.1</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.4.3</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>

</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/searchindex.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/cftime/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from ._cftime import microsec_units, millisec_units, \
sec_units, hr_units, day_units, min_units,\
UNIT_CONVERSION_FACTORS
from ._cftime import __version__
# legacy functions in _cftime_legacy.pyx
from ._cftime import __version__, CFWarning
from ._cftime import DatetimeNoLeap, DatetimeAllLeap, Datetime360Day, DatetimeJulian, \
DatetimeGregorian, DatetimeProlepticGregorian
# legacy functions in _cftime_legacy.pyx
from ._cftime import utime, JulianDayFromDate, DateFromJulianDay
Loading