rust-syndication / rss

Library for serializing the RSS web content syndication format
https://crates.io/crates/rss
Apache License 2.0
419 stars 52 forks source link

add setters with DateTime #108

Closed andy128k closed 3 years ago

andy128k commented 3 years ago

Closes #106

New methods have suffix _strict. I am not super excited with this and am open to suggestions.

codecov[bot] commented 3 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@4853f0c). Click here to learn what that means. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #108   +/-   ##
=========================================
  Coverage          ?   86.19%           
=========================================
  Files             ?       25           
  Lines             ?     1927           
  Branches          ?        0           
=========================================
  Hits              ?     1661           
  Misses            ?      266           
  Partials          ?        0           
Impacted Files Coverage Δ
src/channel.rs 88.03% <100.00%> (ø)
src/item.rs 92.90% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4853f0c...be475d6. Read the comment docs.

kitlith commented 3 years ago

I don't have any immediate ideas on a better name, though it would be nice if we could do it with the builders, too.

Frankly, I think most of my difficulties were because I started with a chrono::NaiveDate. It may be sufficient to just note in documentation that "you can easily format a date as rfc822 with chrono::DateTime::to_rfc2822()" and leave it at that.

andy128k commented 3 years ago

@kitlith

Examples how to use this crate with chrono are added in #112.