Java LocalDate Calculate medTime(LocalDate date, String text)

Here you can find the source of medTime(LocalDate date, String text)

Description

med Time

License

Apache License

Declaration

public static Instant medTime(LocalDate date, String text) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.ZoneId;

public class Main {
    public static Instant medTime(String text) {
        return medTime(LocalDate.now(), text);
    }//from ww  w . jav  a 2 s. c  om

    public static Instant medTime(LocalDate date, String text) {
        return LocalDateTime.of(date, LocalTime.parse(text))
                .atZone(ZoneId.systemDefault()).toInstant();
    }
}

Related

  1. lastMonth(LocalDate date)
  2. localDate2ms(final LocalDate ld)
  3. LocalDateFromMilli(long value)
  4. localDateToSystemAdjustedStartOfDayDate(LocalDate d)
  5. max(ChronoLocalDate date1, ChronoLocalDate date2)
  6. minusDaysAdjustedToStartOfDay(LocalDate ld, int days)
  7. newToOld(LocalDate d)
  8. next(Predicate p)
  9. normalizedYear(LocalDate d)