Java LocalDate to Date date(LocalDate date)

Here you can find the source of date(LocalDate date)

Description

Converts a date to a string.

License

Open Source License

Parameter

Parameter Description
date the date

Return

the string form

Declaration

public static String date(LocalDate date) 

Method Source Code

//package com.java2s;
/*/*from  ww w. jav a  2 s  .c  om*/
 * Copyright (C) 2017 - present by OpenGamma Inc. and the OpenGamma group of companies
 *
 * Please see distribution for license.
 */

import java.time.LocalDate;

import java.time.format.DateTimeFormatter;

import java.util.Locale;

public class Main {
    /** Date format. */
    private static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern("dMMMuu", Locale.UK);

    /**
     * Converts a date to a string.
     * 
     * @param date  the date
     * @return the string form
     */
    public static String date(LocalDate date) {
        return date.format(DATE_FORMAT);
    }
}

Related

  1. convertToDate(LocalDate localDate)
  2. date(LocalDate d, ZoneId zone)
  3. date(LocalDate date)
  4. date(LocalDate date)
  5. localDateToDate(LocalDate date)
  6. localDateToDate(LocalDate ld)