Java Day getDayNumber()

Here you can find the source of getDayNumber()

Description

Get the number of the current day

License

LGPL

Return

The number of the current day

Declaration

public static String getDayNumber() 

Method Source Code


//package com.java2s;
//License from project: LGPL 

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    /**//w ww . jav  a 2  s  .  c o m
     * Get the number of the current day
     * @return The number of the current day
     */
    public static String getDayNumber() {
        Date date = new Date();
        SimpleDateFormat format = new SimpleDateFormat("dd");
        String output = format.format(date);
        return output;
    }
}

Related

  1. getDayInWeekBeginAndEnd(Date date)
  2. getDayInWeekForMonthIn2Characters(int year, int month)
  3. getDayName(String dateString)
  4. getDayNameForDate(java.util.Date dt, boolean fullname)
  5. getDayNames(Locale locale)
  6. getDayOfDate(Date date)
  7. getDayOffset(String date, int offset, String format)
  8. getDayofTheDate(Date d1)
  9. getDAYOFWEEK(String strDate)