Java Today getToDayEndTime()

Here you can find the source of getToDayEndTime()

Description

get To Day End Time

License

Open Source License

Declaration

public static String getToDayEndTime() 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {

    public static String getToDayEndTime() {
        return getCurrentDay("yyyy-MM-dd") + " 23:59:59";
    }/*from   ww w. j ava2s  . c  om*/

    public static String getCurrentDay(String pattern) {
        SimpleDateFormat simpleFormate = new SimpleDateFormat(pattern);
        return simpleFormate.format(new Date());
    }

    public static String format(java.util.Date date, String format) {
        String result = "";
        try {
            if (date != null) {
                java.text.DateFormat df = new java.text.SimpleDateFormat(format);
                result = df.format(date);
            }
        } catch (Exception e) {
        }
        return result;
    }

    public static String format(java.util.Date date) {
        return format(date, "yyyy/MM/dd");
    }
}

Related

  1. getTodayDateInString()
  2. getTodayDbFormat()
  3. getTodayDisplayString()
  4. getTodayEnd()
  5. getTodayEnd()
  6. getTodayFolder()
  7. getTodayFormat(String format)
  8. getTodayFormatString(String pattern)
  9. getTodayFormatted(String pattern)