Java LocalDate from String toLocalDate(String date)

Here you can find the source of toLocalDate(String date)

Description

to Local Date

License

Open Source License

Declaration

public static LocalDate toLocalDate(String date) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

public class Main {
    private static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern("yyyy/MM/dd");

    public static LocalDate toLocalDate(String date) {
        return LocalDate.parse(date, DATE_FORMAT);
    }/*from   w w  w  . j  ava2  s .  c om*/
}

Related

  1. parseLocalDate(String dateString)
  2. parseLocalDate(String inPattern, String inDate)
  3. parseLocalDate(String localDate)
  4. parseStringToLocalDate(String strDate)
  5. toLocalDate(String date)
  6. toLocalDate(String dateValue)