Java LocalDate Format changeLocalDateToFormattedString(LocalDate value)

Here you can find the source of changeLocalDateToFormattedString(LocalDate value)

Description

change Local Date To Formatted String

License

Open Source License

Declaration

public static String changeLocalDateToFormattedString(LocalDate value) 

Method Source Code

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

import java.time.LocalDate;

import java.time.format.DateTimeFormatter;

public class Main {
    public static String changeLocalDateToFormattedString(LocalDate value) {
        if (value == null)
            return "";
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy");
        String formattedString = value.format(formatter);
        return formattedString;
    }//from ww w  .ja v  a  2 s  .  c om
}

Related

  1. dateToString(LocalDate date, DateTimeFormatter formatter)
  2. doesParsedDateMatchText(LocalDate parsedDate, String text, Locale formatLocale)
  3. format(final LocalDate source)
  4. formateDate(LocalDate date, String formatStr)