Java Day of ToEnglishDay(Date dt)

Here you can find the source of ToEnglishDay(Date dt)

Description

To English Day

License

Open Source License

Declaration

public static String ToEnglishDay(Date dt) 

Method Source Code


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

import java.text.DateFormatSymbols;
import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    private static final String[] MONTHS = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct",
            "Nov", "Dec" };

    public static String ToEnglishDay(Date dt) {
        if (dt == null)
            return "";
        DateFormatSymbols sym = new DateFormatSymbols();
        sym.setMonths(MONTHS);/*  ww  w . j a  v a2s  .c  o  m*/
        SimpleDateFormat f = new SimpleDateFormat("dd MMM, yyyy", sym);

        return f.format(dt);
    }
}

Related

  1. startOfDay(Date date, String format)
  2. stringSomeDaysAgo(Date currentTime, int days)
  3. strToShortday(String s)
  4. subtractDate(Date d, long day)
  5. toCurrentDatedefer(int day)
  6. ToEnglishDayWithMon(Date dt)
  7. tomorrow(int dayafter)
  8. toNextDayYMD()
  9. toUtcDay(Date d)