OffsetDateTime::replace_time? #256
Labels
A-core
Area: anything not otherwise covered
C-feature-request
Category: a new feature (not already implemented)
E-easy
Not much experience needed.
Milestone
I find myself writing code like this:
which, while is fairly explicit about what is going on, feels a little long compared to
(I figured
with_time
is not appropriate thing to call this, because the rest of the library uses that for combining things rather than replacing parts of things. I imagineset_
could also be a decent name, though that very slightly suggests more of a &mut self interface to me, as opposed to just a self)And in fact, since it seems that "replacing parts of things" is generally not a pattern exposed anywhere in the library, this would likely open up the pandora's box of "but I want to replace the hour of this
Time
" etc. etc., so I could understand why one might not want to go down this route.That said, I'd find this quite ergonomic, so here's my shot at suggesting it!
The text was updated successfully, but these errors were encountered: