Alexey Solodkiy

Results 35 comments of Alexey Solodkiy

Year is not really a range, but also could represent a whole year from first day to last.

>maybe we should name this one toDuration() for consistency then? I am not sure we should fight for consistency with Java here. Can you describe main logic of choosing between...

>Though I'm sure you can find a counter-example in the codebase. I will look for it, maybe it good point to do some rename for consistency then.

@BenMorel I renamed method, and also added YearMonthRange::toDuration

I think about time zones and Local Range duration. In some time zones with Daylight Saving Time duration between day start and day end is not so obvious. For example...

>What's your use case for this method exactly? Actually I don't remember it anymore :) I will return when I do.

Should the end of this range be inclusive like in LoccalDateRange, or exclusive like in Interval?

Related to https://github.com/brick/date-time/issues/34

I think the reason is that concept of inclusive duration is quite complicated when units become small. ``` $a = ZonedDateTime::parse('2020-01-01T15:16:20'); $range = crateRange($a, $a); $duration = $range->getDuration(); var_dump($duration); ```...

>Any reason it shouldn't be 0 ? Inclusion :) For example same code but with LocalDateRange give you duration of one day. In this case difference between inclusive and exclusive...