Java Day of isSomeDay(String date)

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

Description

is Some Day

License

Apache License

Declaration

public static Boolean isSomeDay(String date) 

Method Source Code

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

import java.text.SimpleDateFormat;
import java.util.*;

public class Main {
    public static final String YMD_HMS = "yyyy-MM-dd HH:mm:ss";

    public static Boolean isSomeDay(String date) {
        String today = date2Str(new Date(), "yyyy-MM-dd");
        return date.equals(today);
    }/*from   www  .j  ava2s  .  c o  m*/

    public static String date2Str(Date date) {
        SimpleDateFormat sdf = new SimpleDateFormat(YMD_HMS);
        return sdf.format(date);
    }

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

Related

  1. isEndOfDay(GregorianCalendar cal1)
  2. isHoliday(Date date, String[] excludes, String[] includes)
  3. isIn(int reserveDayCount, String dateString)
  4. isInAllDayFormat(String date)
  5. isNowDay(String d)
  6. lastDays(int count)
  7. long2StringPerDay(long t, SimpleDateFormat sdf)
  8. minDayToLong(String time)
  9. minusDate(int day, int type)