Java Minute Get getMinDateString(Date date)

Here you can find the source of getMinDateString(Date date)

Description

get Min Date String

License

Open Source License

Declaration

public static String getMinDateString(Date date) 

Method Source Code


//package com.java2s;
import java.text.DateFormat;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public final static String minFormat = "yyyyMMddHHmm";

    public static String getMinDateString(Date date) {
        DateFormat dateFormat = new SimpleDateFormat(minFormat);
        return formatDateString(date, dateFormat);
    }//from w w w . ja va  2 s  .  co  m

    public static String formatDateString(Date date, DateFormat dateFormat) {
        if (date == null || dateFormat == null) {
            return null;
        }
        return dateFormat.format(date);
    }

    public static String format(Date date, String format) {
        if (date == null) {
            return null;
        }
        return new SimpleDateFormat(format).format(date);
    }
}

Related

  1. getHoursMinutesSeconds(float timeInSeconds)
  2. getLessThanOneMinuteAgoRendering()
  3. getMilliSecondFromMinute(int minute)
  4. getMin()
  5. getMin(String dateTime)
  6. getMineType(String urlFile)
  7. getMininte(Date time)
  8. getMiniTime()
  9. getMinute()