Java Day dayFillter(String text, String type)

Here you can find the source of dayFillter(String text, String type)

Description

day Fillter

License

Open Source License

Declaration

public static Date dayFillter(String text, String type) 

Method Source Code

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

import java.text.ParseException;
import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static Date dayFillter(String text, String type) {
        SimpleDateFormat format = new SimpleDateFormat(type);
        try {//from  w w  w . j  av  a2  s .co  m
            return format.parse(text);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return new Date();
    }

    public static Date parse(String text, String type) throws ParseException {
        SimpleDateFormat format = new SimpleDateFormat(type);
        return format.parse(text);
    }
}

Related

  1. dateValue(Date d)
  2. day2Day(String startDate, String endDate, String format)
  3. day2ThuesDay(Date date)
  4. dayDiff(Date date1, String date2)
  5. dayEnd(Date date)
  6. dayFillter(String text, String type)
  7. dayFilter(Date date)
  8. dayForAMorPM(String date)
  9. dayFormat(Date date)