Add DateTime::try_to_rfc2822, deprecate DateTime::to_rfc2822#1330
Add DateTime::try_to_rfc2822, deprecate DateTime::to_rfc2822#1330pitdicker wants to merge 2 commits intochronotope:mainfrom
DateTime::try_to_rfc2822, deprecate DateTime::to_rfc2822#1330Conversation
99444ed to
e6ecf92
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1330 +/- ##
==========================================
+ Coverage 91.80% 91.82% +0.01%
==========================================
Files 40 40
Lines 18329 18352 +23
==========================================
+ Hits 16827 16851 +24
+ Misses 1502 1501 -1 ☔ View full report in Codecov by Sentry. |
e6ecf92 to
a72d980
Compare
14037a1 to
da1ff7e
Compare
da1ff7e to
e980391
Compare
|
@djc Sorry for all the pushes. I don't depend on them for any other work. But maybe nice to keep in mind for reviewing? They should not do anything surprising, it is more a matter of: do we want to deprecate them on 0.4? |
|
So my main hesitation about this and #1331 has been that I find the For example, maybe we have a |
I have to think about this for a bit. |
I'm not too fond of the name either. Maybe we should just make the A wrapper type such as |
Split out from #1144.
This adds a new method
try_to_rfc2822that returnsNoneinstead of panicking on years outside of 0..9999.