Conversation
(MRI did remove tabs in *.rb but after date was made native)
* Tests are unaffected by this change. * Zone offset and Gregorian cutover are computed from the DateTime. * They are still copied in instances variables for ease of compatibility with current code. * @ajd need to be preserved for now as DateTime only has millisecond precision, date.rb has arbitrary (although mentioned not expected > ns) (via Rational). * Joda methods are used for year,week,day,hour,min and second (but not fractions since it might be imprecise).
Member
|
Spacing seems to be messed up. Could you fix it? |
Member
Author
|
@BanzaiMan It is intended, tabs are converted to 8 spaces, and it should have been the case in MRI but the tabs expansion happened after date.rb was made a native library. See the second commit for a proper diff. If it is really a problem, I guess I could try without changing the weird indentation (mix of tabs/spaces) but it is really a pain to work with and should not be there as I just said. I mean to commit this spacing change separately. |
Member
Author
|
See #890. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here are the first commits.
There are many problems for now.
Date.civil).date.rbsays it has ns, but actually is arbitrary (through Rational).@ajdin the instance as a Rational to keep the precision.I am not sure Joda's DateTime methods such as getYear() provide a significant speedup, I should measure that to see if it is worth changing (it is changed for now when precision is not an issue).
There is an additonnal test failure about meeting a Bignum (should have been a long). That would mean that time is not representable by Joda-Time, I'll check.
Maybe the biggest problem is in parsing/dumping with str{f,p}time? In that case I should probably focus on that and the solution of building lazily the Joda DateTime might be a good option.