Date Time Functions - Modifiers and Basic Time Values#123
Conversation
| let m = m + 12 * a - 3; | ||
|
|
||
| let jdn_int = | ||
| d + (153 * m + 2) / 5 + 365 * y + y / 4 - y / 100 + y / 400 - JULIAN_DAY_EPOCH_OFFSET; |
There was a problem hiding this comment.
Potential Bug: If a Value::Real represents a Julian Day Number with subsecond precision (e.g., 2461022.0000014235), creating JulianDay::new(*jdn_float) will again set is_subsecond to false. This will cause as_time() and as_datetime() to lose the subsecond information. Consider making JulianDay::new intelligent about inferring is_subsecond from the f64 value, or provide an explicit way to set it during construction.
|
AI review done up to commit: b2316b8 AI Review Summary:This pull request introduces a new |
|
AI review done up to commit: 85b258d AI Review Summary:This PR introduces a new constructor for |
|
AI review done up to commit: 8d50304 AI Review Summary:Code review completed. Reviewed 0 files with 0 comments. |
Fix issue with seconds calculation Refactor datetime to build a julian day object Simple integration tests for the initial implementation of datetime functions Move datetime builder into jdn Parsing implemented for simple modifiers Fix issue with testing fix fmt Add todo list fix backup PR review service
8d50304 to
f2db010
Compare
|
AI review done up to commit: f2db010 AI Review Summary:Reviewed 11 files introducing new date/time functionality. Identified issues related to inconsistent return types and incorrect struct modification in datetime functions. Also noted a potential off-by-one error in Julian Day calculation and a redundant clone in tests. Overall, the new functionality is significant but requires refinement in error handling and type consistency. |
|
AI review done up to commit: 522788c AI Review Summary:I have reviewed the changes, which involve refactoring date and time modifier parsing and updating associated tests. One potential logic error was found in Overall, the changes appear to be functional but require attention to the identified logic and testing concerns. |
|
AI review done up to commit: c9e41c3 AI Review Summary:The changes involve reformatting the arguments of the JulianDay::new_relative_from_datetime_vals function calls to be on separate lines for improved readability. No functional changes, bugs, or security issues were introduced. The overall quality of the changes is good. |
No description provided.