<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Feb 17, 2017 at 5:11 AM, Gunnar Morling <span dir="ltr"><<a href="mailto:gunnar@hibernate.org" target="_blank">gunnar@hibernate.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> You don't compare, because they are not the same. The idea is that the<br>
> Period must be defined in terms of the units for which you defined its<br>
> boundaries.<br>
<br>
</span>I see. I'm wondering though how practical that will be. Will the<br>
developer who puts the constraint always know the structure of the<br>
Period set to the field (data set by the application user)?<br></blockquote><div><br></div><div>In the case you want it to be validated, you ought to :-)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> You shouldn't support threeten-extra, but rather arbitrary TemporalAmounts.<br>
> Then threeten-extra just happen to be one of those. There must be something<br>
> like @ChronoUnitMax/@ChronoUnitMin such as:<br>
><br>
> @ChronoUnitMax(unit=DAYS, value=1)<br>
<br>
</span>How would that look like for a Period with several elements set, e.g.<br>
"3 months, 2 days"? Would we need a dedicated member in @ChronoUnitMax<br>
for each value of ChronoUnit (which are a lot)?<br></blockquote><div><br></div><div>What do you mean by a member in @ChronoUnitMax? In my example, I suggest using unit as a member, leading to unit and value being the only members.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We had a discussion of Duration et al. a while ago, but it petered<br>
out. So we thought we'd add something to the RI to spark a new<br>
discussion. Seems it worked :)</blockquote><div><br></div><div>Can´t disagree :-)</div><div><br></div><div>Regards,</div><div>Michael</div></div></div></div>