-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISO 8601 date-time side-issue (see #119) #887
Conversation
Some initial thoughts on implementation (for discussion, if controversial...)
Some more or less related issues that may or may not be tackled initially -
|
I'm glad to provide full integer routines for Julian day to proleptic Gregorian and back conversion, which does run as well with negative Julian days and spans the entire lifetime of Earth. It took me quite a while to get this running and I haven'T found something like this before. It is in C. But there should be no problem porting it to python. I'll sen the file to Hilary for further distribution... |
Luis - thanks, but (excuse my ignorance!) can you explain why we need that - I thought ISO 8601 could represent the full range of dates etc.? |
Hi Hilary, what date do you get for -60010317T134723Z by cycling R2347/PT3M ? you need to have a clean time axis. So, if you like to support all <=> days/milliseconds And all cycling activities are trivial on days/milliseconds Cheerio, On 12/02/14 13:52, Hilary James Oliver wrote:
|
I see, thanks. Maybe @benfitzpatrick can comment on the calculations... |
@m214089, the data model we put in in #597 supports all negative If running a suite based around a particular historical date that was We can definitely support your example using the above library >>> import isodatetime
>>> recurrence = isodatetime.TimeRecurrenceParser().parse("R2347/-0060010317T134723Z/PT3M")
>>> recurrence.get_next(recurrence.start_point)
-006001-03-17T13:50:23Z Days and milliseconds since a given date are useful, but they |
Great. If you could keep it simpler fine with me. |
@hjoliver - when this is implemented it'll need doing so that all dependencies on incrementing/generating next date/comparing dates/etc are dependent on the isodatetime library only so that the climate calendar extension (see our email chain) can just be slotted in with minimal changes to cylc. |
@arjclark - yes indeed (360-day calendar) |
@hjoliver, re: your points above:
(obviously with different syntax) |
(I agree with your implementation thoughts) |
@benfitzpatrick - thanks for your comments. I had forgotten you had "memoized" cycle_time.py - a nice technique! |
Implementation Plan Here's how I intend to start, early next week.
If there are no unforeseen problems this should give us complete ISO8601 cycling capability very quickly (including sub-hourly etc.). Then:
@matthewrmshin et.al. - any disagreement with this approach, please let me know Friday (UK time) - I'm taking the family on a beach holiday Friday evening though Sunday, but if my enthusiasm gets the better of me I may make a start on this Sunday night. |
I'm closing this as a Pull Request is not really the right way to handle the early stages of such a big change - too much rebasing and/or updating from master will be required (and there are no real commits on the branch yet). Better to use feature branches on github that can be turned into Pull Requests when ready. Discussion reverting to #119. |
An empty pull request to get this show (#119) on the road.