Java Day of getCalendarByDay(String dayStr)

Here you can find the source of getCalendarByDay(String dayStr)

Description

get Calendar By Day

License

Apache License

Declaration

public static Calendar getCalendarByDay(String dayStr) throws ParseException 

Method Source Code


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

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

import java.util.Calendar;

import java.util.Date;

public class Main {
    public static DateFormat yyyyMMddFormat = new SimpleDateFormat("yyyyMMdd");

    public static Calendar getCalendarByDay(String dayStr) throws ParseException {
        Calendar calendar = Calendar.getInstance();
        Date date = yyyyMMddFormat.parse(dayStr);
        calendar.setTime(date);/*  w ww  .jav a2s  .  c om*/
        return calendar;
    }
}

Related

  1. getBirthday(String age)
  2. getBirthDay(String idCard)
  3. getBirthDayDateFormat()
  4. getBirthdayFormatStr(Date date)
  5. getBookInfoDate(int days)
  6. getConfirmDateTimeOfDay(Date currentDate)
  7. getCurDayZero()
  8. getDataFile(int tableId, Date day)
  9. getDataTimeForwordDay(Date date, int dayNum)