Java Date Now getCurrentDay(int model)

Here you can find the source of getCurrentDay(int model)

Description

get Current Day

License

Open Source License

Declaration

public static String getCurrentDay(int model) 

Method Source Code


//package com.java2s;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {

    public static String getCurrentDay(int model) {
        return getDateStringForFormat(model == 0 ? "d" : "dd");
    }/* ww w  .  j  a  v  a 2s. com*/

    public static String getDateStringForFormat(String format) {
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        return sdf.format(new Date());
    }
}

Related

  1. getCurrentDay()
  2. getCurrentDay()
  3. getCurrentDay()
  4. getCurrentDay()
  5. getCurrentDay()
  6. getCurrentDay(String pattern)
  7. getCurrentDayBegin()
  8. getCurrentDayInyyyyMMdd()
  9. getCurrentFormattedTime()