Java Time Readable Format getMaxTimeByStringDate(String date)

Here you can find the source of getMaxTimeByStringDate(String date)

Description

get Max Time By String Date

License

Open Source License

Declaration

public static java.util.Date getMaxTimeByStringDate(String date) 

Method Source Code

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

import java.text.SimpleDateFormat;

public class Main {
    public static java.util.Date getMaxTimeByStringDate(String date) {
        try {/*from ww w  .  j  a v a  2s.  c om*/
            String maxTime = date + " 23:59:59";
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            return sdf.parse(maxTime);
        } catch (Exception e) {
            return null;
        }
    }
}

Related

  1. humanTime(long ms)
  2. humanTime(long seconds)
  3. humanTime(long start, long end)
  4. toHumanable(long time_millsecod)