Java SQL Date calcThisMonth(String begin, String end, String now, GregorianCalendar calendar)

Here you can find the source of calcThisMonth(String begin, String end, String now, GregorianCalendar calendar)

Description

calc This Month

License

Apache License

Declaration

public static void calcThisMonth(String begin, String end, String now, GregorianCalendar calendar) 

Method Source Code

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

import java.util.GregorianCalendar;

public class Main {
    public static void calcThisMonth(String begin, String end, String now, GregorianCalendar calendar) {
        end = now;// w  ww  . ja  va 2  s  .c o  m
        int dayOfMonth = calendar.get(GregorianCalendar.DATE);
        calendar.add(GregorianCalendar.DATE, -dayOfMonth + 1);
        begin = new java.sql.Date(calendar.getTime().getTime()).toString();
        System.out.println(" begin: " + begin);
        System.out.println(" end: " + end);
        System.out.println(" ---------------------- ");
    }
}

Related

  1. calcLastMonth(String begin, String end, String now, GregorianCalendar calendar)
  2. canConvert(Class clz)
  3. convert(Class propertyType, Object value, String propertyName)
  4. convert(Object o)
  5. convertTo(Class clazz, Object obj)