Java Today getTodaysDate(String dateFormat)

Here you can find the source of getTodaysDate(String dateFormat)

Description

Get today's date and return it in the right format

License

GNU General Public License

Declaration

public static String getTodaysDate(String dateFormat) 

Method Source Code

//package com.java2s;

import java.util.*;

public class Main {
    /** //w w w .  j a va2 s. c o m
     * Get today's date and return it in the right format 
     */
    public static String getTodaysDate(String dateFormat) {
        SimpleDateFormat timeFormat = new SimpleDateFormat(dateFormat);
        timeFormat.setTimeZone(TimeZone.getDefault());
        return timeFormat.format(new Date());
    }
}

Related

  1. getTodayLimit()
  2. getTodayMidnight()
  3. getTodayMin()
  4. getTodayNight()
  5. getTodaysDate()
  6. getTodayStart()
  7. getTodayStr()
  8. getTodayStr()
  9. getTodayString()