List of usage examples for java.time LocalTime MIN
LocalTime MIN
To view the source code for java.time LocalTime MIN.
Click Source Link
From source file:Main.java
public static void main(String[] args) { LocalTime l = LocalTime.MIN; System.out.println(l); }
From source file:Main.java
public static void main(String[] args) { LocalDate february20th = LocalDate.of(2014, Month.FEBRUARY, 20); System.out.println(february20th); System.out.println(LocalDate.from(february20th.plus(15, ChronoUnit.YEARS))); // 2029-02-20 System.out.println(LocalDate.MAX); System.out.println(LocalDate.MIN); System.out.println(LocalTime.MIDNIGHT); // 00:00 System.out.println(LocalTime.NOON); // 12:00 System.out.println(LocalTime.of(23, 12, 30, 500)); // 23:12:30.000000500 System.out.println(LocalTime.now()); // 00:40:34.110 System.out.println(LocalTime.ofSecondOfDay(11 * 60 * 60)); // 11:00 System.out.println(LocalTime.from(LocalTime.MIDNIGHT.plusHours(4))); // 04:00 System.out.println(LocalTime.MIN); System.out.println(LocalTime.MAX); System.out.println(LocalDateTime.of(2014, 2, 15, 12, 30, 50, 200)); // 2014-02-15T12:30:50.000000200 System.out.println(LocalDateTime.now()); // 2014-02-28T17:28:21.002 System.out.println(LocalDateTime.from(LocalDateTime.of(2014, 2, 15, 12, 30, 40, 500).plusHours(19))); // 2014-02-16T07:30:40.000000500 System.out.println(LocalDateTime.MAX); }
From source file:ru.jts_dev.gameserver.time.GameTimeService.java
public long minutesPassedSinceDayBeginning() { final ZonedDateTime dayBeginning = dateTime.with(LocalTime.MIN); return dayBeginning.until(dateTime, ChronoUnit.MINUTES); }
From source file:fr.zcraft.MultipleInventories.importers.ImportProcess.java
/** * @return The estimated time remaining, formatted for human read. *//*from w ww .j a va 2 s .c o m*/ public String getHumanFriendlyETA() { final int eta = getETA(); if (eta > 0) { String friendlyETA = LocalTime.MIN.plusSeconds(eta).toString(); // Adds seconds if needed, as LocalTime does not includes them if zero. if (friendlyETA.length() == 5) friendlyETA += ":00"; return friendlyETA; } else return I.t("currently unknown"); }
From source file:org.jbb.members.impl.base.search.MemberSpecifications.java
public static Specification<MemberEntity> withJoinCriteria(LocalDate date, JoinMoment joinMoment) { if (date == null || joinMoment == null) { return null; }//from w ww. j a va 2s . co m if (joinMoment.equals(JoinMoment.BEFORE)) { return (root, cq, cb) -> cb.lessThan( root.get(MemberEntity_.registrationMetaData).get(RegistrationMetaDataEntity_.joinDateTime), date.atTime(LocalTime.MIN)); } else if (joinMoment.equals(JoinMoment.THAT_DAY)) { return (root, cq, cb) -> cb.between( root.get(MemberEntity_.registrationMetaData).get(RegistrationMetaDataEntity_.joinDateTime), date.atTime(LocalTime.MIN), date.atTime(LocalTime.MAX)); } else { return (root, cq, cb) -> cb.greaterThan( root.get(MemberEntity_.registrationMetaData).get(RegistrationMetaDataEntity_.joinDateTime), date.atTime(LocalTime.MAX)); } }