[m-rev.] for review: improve error checking in the time module

Zoltan Somogyi zoltan.somogyi at runbox.com
Mon Aug 9 02:39:55 AEST 2021



On Mon, 9 Aug 2021 02:35:07 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
> >> +        java.time.ZoneId tz = java.time.ZoneId.systemDefault();
> >> +        java.time.Instant Time0 = java.time.ZonedDateTime.of(
> >> +            java.time.LocalDateTime.of(Yr + 1900, Mnt + 1, MD, Hrs, Min, Sec),
> >> +            tz).toInstant();
> >
> > Seeing "tz)" at the *start* of a line is jarring.
> 
> Do you have an alternative formatting in mind (that doesn't exceed the
> 80 char line limit)? 

I would try assigning the first arg of ".of" to a var before calling ".of".
Likewise for the result of ".of" before calling ".toInstant".
If the var names are short enough, the code then may fit in 80 columns.

Zoltan.





More information about the reviews mailing list