-
Notifications
You must be signed in to change notification settings - Fork 16
Update Duration.prototype.round to latest spec #188
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
Comments
// 27. If plainRelativeTo is not undefined, then
// a. Let internalDuration be ToInternalDurationRecordWith24HourDays(duration).
let time_duration = self.time.to_normalized().add_days(self.days().as_())?;
// b. Let targetTime be AddTime(MidnightTimeRecord(), internalDuration.[[Time]]).
let target_time = PlainTime::default().add_normalized_time_duration(time_duration);
// c. Let calendar be plainRelativeTo.[[Calendar]].
// d. Let dateDuration be ! AdjustDateDurationRecord(internalDuration.[[Date]], targetTime.[[Days]]).
let date_duration = date_duration.adjust(target_time.0.into(), None, None)?; Started to update the round_with_provider method, within duration.rs. |
@Magnus-Fjeldstad Are you still working on this? |
Yes but i cant Get the tozonedatetime to work |
Sounds good. For reference, the Boa implementation is here if you haven't seen it yet. If you have any questions, feel free to reach out in matrix. |
Thank you, ive been really busy lately but i will try to get some work done the following days. Hopefully a PR by next week. |
Sounds good. Feel free to reach out if you have any questions |
Hi this have proven to be to difficult for me, i will join @HenrikTennebekk and work on #142. Sorry for the inconvenience. |
Totally fine! It's has a lot of various nuances to it. |
Resolves #188 --------- Co-authored-by: Kevin Ness <[email protected]>
This function appears to be written against an old version of the spec. It is hard to verify correctness and update it to use the newer AOs.
The text was updated successfully, but these errors were encountered: