Java Day getDayAfterTommorrowsDateFne()

Here you can find the source of getDayAfterTommorrowsDateFne()

Description

Gets the day after tommorrows date fne.

License

Open Source License

Return

the day after tommorrows date fne

Declaration

public static String getDayAfterTommorrowsDateFne() 

Method Source Code


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

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Main {
    /**/*from ww w  . j  av a 2  s.c  o  m*/
     * Gets the day after tommorrows date fne.
     * 
     * @return the day after tommorrows date fne
     */
    public static String getDayAfterTommorrowsDateFne() {
        DateFormat formatter = new SimpleDateFormat("MMM");
        SimpleDateFormat monthParse = new SimpleDateFormat("MM");
        DateFormat dformatter = new SimpleDateFormat("DD");
        SimpleDateFormat dateParse = new SimpleDateFormat("DD");
        Calendar cal = Calendar.getInstance();
        String month = Integer.toString(cal.get(Calendar.MONTH) + 1);
        String date = Integer.toString(cal.get(Calendar.DATE) + 2);
        try {
            month = formatter.format(monthParse.parse(month));
            date = dformatter.format(dateParse.parse(date));
        } catch (ParseException e) {
        }
        String calDate = month + " " + date;
        return calDate;
    }
}

Related

  1. GetDay(String agmipDate)
  2. getDAY(String strDate)
  3. getDay(String string)
  4. getDay(String tempdat, Locale locale)
  5. getDayAfter(String dateformat, String day, int filed, int delta)
  6. getDayBefore(Date date)
  7. getDayBegin(Date date)
  8. getDayBetween(String firstDay, String secondDay)
  9. getDayDate(String date, String formatFormat)