Eric Sheppard

Results 99 comments of Eric Sheppard

Thanks for adding this @botahamec - and thanks @gerritsangel for the original comments - I think this is a great idea. As you mention this will be tricky without a...

@djc - because in the `None` case of the current `LocalResult` we have lost the original local timestamp, which we need to complete a lossy conversion to a `DateTime` @botahamec...

@kevincox - if you are using `chrono-tz` then can solve most cases by using [`user_tz.offset().base_utc_offset()`](https://docs.rs/chrono-tz/latest/chrono_tz/trait.OffsetComponents.html#tymethod.base_utc_offset) and [`user_tz.offset().dst_offset()`](https://docs.rs/chrono-tz/latest/chrono_tz/trait.OffsetComponents.html#tymethod.dst_offset) to get the possible offsets to more easily calculate the closest valid local...

Hi @kevincox - on a further review of the code I think my previous answer may be wrong. It looks like `dst_offset` returns 0 when not in DST and the...

Hi @DavidMazarro - this is an interesting idea, these kind of functions (Especially ones dealing with adding/subtracting months in my experience) have quite wide applicability. That said there are a...

Had some excellent points from @avantgardnerio on this in #731 > @esheppa , I'd like to push back against the idea of a YearMonth being related to an instant in...

Some previous issues in this repo also discussed similar ideas: * https://github.com/chronotope/chrono/issues/29 * https://github.com/chronotope/chrono/issues/44 * https://github.com/chronotope/chrono/issues/52 * https://github.com/chronotope/chrono/issues/69#issuecomment-311449158 * https://github.com/chronotope/chrono/issues/152 * https://github.com/chronotope/chrono/issues/184 * https://github.com/chronotope/chrono/issues/202 * https://github.com/chronotope/chrono/issues/203 * https://github.com/chronotope/chrono/issues/266 * https://github.com/chronotope/chrono/issues/290...

My previous comment was probably a bit verbose, but you sum it up well with Month/Quarter/Year being in a different category from Minute and Hour (Day and Week are arguable...

In the provided implementations we could have `Quarters(1) == Months(3)`, `Years(1) == Months(12)` and avoid having `Quarters` and `Years` datatypes. Essentially `Month` would implement `Add`, while `Quarter` would also implement...

My main reasons for using types like this are: * Storing just the minimal information (eg if all I need is "December 2022" I'd prefer to use a `Month` data...