Here you can find the source of formatDateLong(Date date, Locale locale)
Parameter | Description |
---|---|
date | a date to format. |
locale | a locale. |
public static String formatDateLong(Date date, Locale locale)
//package com.java2s; /*/* w w w . j a va 2 s. co m*/ * Copyright (c) 2015-2016 QuartzDesk.com. * Licensed under the MIT license (https://opensource.org/licenses/MIT). */ import java.text.DateFormat; import java.util.Date; import java.util.Locale; public class Main { /** * Formats the specified date using the {@link DateFormat#LONG} format and the specified locale. * * @param date a date to format. * @param locale a locale. * @return the formatted date. */ public static String formatDateLong(Date date, Locale locale) { return DateFormat.getDateInstance(DateFormat.LONG, locale).format(date); } }