<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">&lt;<a href="mailto:gunnar@hibernate.org" target="_blank">gunnar@hibernate.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">&gt; You don&#39;t compare, because they are not the same. The idea is that the<br>
&gt; Period must be defined in terms of the units for which you defined its<br>
&gt; boundaries.<br>
<br>
</span>I see. I&#39;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>
&gt; You shouldn&#39;t support threeten-extra, but rather arbitrary TemporalAmounts.<br>
&gt; Then threeten-extra just happen to be one of those. There must be something<br>
&gt; like @ChronoUnitMax/@ChronoUnitMin such as:<br>
&gt;<br>
&gt; @ChronoUnitMax(unit=DAYS, value=1)<br>
<br>
</span>How would that look like for a Period with several elements set, e.g.<br>
&quot;3 months, 2 days&quot;? 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&#39;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>