Comments (6)
I think we could potentially fix this behavior on the xarray side, but ISO-8601 is pretty clear that all years should have four digits. So I still think this would be a win. Certainly 0001-01-01
is much clearer than 01-01-01
.
from cftime.
Just checking in on this issue after a while -- so is the consensus that we should address this issue within netcdftime
? If so, I can try to put together a PR.
from cftime.
I think the fundamental problem is that no one has stepped to maintain a separate netcdftime project. Seems like there is still some work to do before I can disconnect it from netcdf4-python.
from cftime.
I'm happy to help step up on the infrastructure side (well, in a couple weeks probably), but I'm a little uncomfortable with stepping up fully since I don't have much technical knowledge in the space netcdftime
is operating. So I'm happy to cut releases and stuff, but I'm not in possession of answers when it comes to solutions to problems.
from cftime.
It occurs to me now that a possibly less disruptive solution than altering the current string representation of netcdftime datetimes would be to simply add an isoformat
method, which we could use in xarray, analogous to datetime.datetime.isoformat
or pd.Timestamp.isoformat
. Would that be preferred over modifying __str__
?
from cftime.
I don't think changing the repr/string format would be disruptive. I expect most users would agree that 0001-01-01
is clearer than 1-01-01
.
That said, I have no objections to adding an isoformat()
method, too.
from cftime.
Related Issues (20)
- Python 3.10 macOS universal2 wheel is not universal (does not contain arm64 architecture) HOT 3
- cftime 1.5.2 breaks Python 2.7 compatibility
- `date2num` raises Exception with masked inputs HOT 1
- Potential approaches for performance improvements in `cftime.num2date` HOT 3
- Test failure with Cython 3 TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'cftime._cftime.DatetimeGregorian' HOT 11
- Inconsistent date2index (netcdf4-python #1155) HOT 1
- 1.6.0: sphinx warning `WARNING: autodoc: failed to import module 'cftime'` HOT 5
- 1.6.0: pytest warnings
- Implement a `strptime` method HOT 12
- New Numpy Version Issues HOT 2
- `cftime.num2date` fails on an empty integer-dtype array
- test_num2date_precision failure on various architectures HOT 3
- OverflowError time values outside range of 64 bit signed integers HOT 13
- Dealing with netcdf time:units with unexpected characters HOT 5
- Future plans for the `longdouble` argument HOT 2
- Support time units that are a multiple of second, hour, or day (with a reference date) HOT 5
- Unexpected results when not using separators in format code with cftime.datetime.strptime HOT 7
- Matplotlib date formatter and cftime : incompatible ? HOT 8
- Parsing "months since ..." dates HOT 4
- Build `musllinux` wheels HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cftime.