Java Calendar Create getCalendar(String date)

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

Description

get Calendar

License

Apache License

Declaration

private static Calendar getCalendar(String date) 

Method Source Code

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

import java.util.Calendar;

public class Main {

    private static Calendar getCalendar(String date) {
        Calendar ret = Calendar.getInstance();

        ret.set(Integer.parseInt(date.substring(0, 4)), Integer.parseInt(date.substring(4, 6)) - 1,
                Integer.parseInt(date.substring(6, 8)), 0, 0, 0);
        ret.set(Calendar.MILLISECOND, 0);
        return ret;
    }//from ww w. j ava  2 s. c  om
}

Related

  1. getCalendar(long millis)
  2. getCalendar(long millis)
  3. getCalendar(long time)
  4. getCalendar(long timeInMillis)
  5. getCalendar(long timeInMillis)
  6. getCalendar(String dateStr, int inputYearType, int outputYearType)
  7. getCalendar(String dateString)
  8. getCalendar(String gdate)
  9. getCalendar(String str)