Update Duration.prototype.round to latest spec
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.
// 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.ToZonedDateTime would be an engine specific implementation item. round should still take the same arguments that it has.
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.