Java LocalDate Format dateToString(LocalDate date, DateTimeFormatter formatter)

Here you can find the source of dateToString(LocalDate date, DateTimeFormatter formatter)

Description

date To String

License

Open Source License

Declaration

public static String dateToString(LocalDate date, DateTimeFormatter formatter) 

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 dateToString(LocalDate date) {
        return String.valueOf(date);
    }/* w w  w .j  av  a 2 s .  c  o m*/

    public static String dateToString(LocalDate date, DateTimeFormatter formatter) {
        if (date != null) {
            return formatter.format(date);
        }
        return null;
    }
}

Related

  1. changeLocalDateToFormattedString(LocalDate value)
  2. doesParsedDateMatchText(LocalDate parsedDate, String text, Locale formatLocale)
  3. format(final LocalDate source)
  4. formateDate(LocalDate date, String formatStr)
  5. formatLocalDate(LocalDate date)