code: public static Date getFirstDayFromCurrentMonth(Date d) {
          Calendar cal = Calendar.getInstance();
          cal.setTime(d);                        
          cal.set(Calendar.DAY_OF_MONTH, 1);
          cal.set(Calendar.HOUR_OF_DAY, 0);
          cal.set(Calendar.MINUTE, 0);
          cal.set(Calendar.SECOND, 0);
          cal.set(Calendar.MILLISECOND, 0);
          return cal.getTime();
      }
docs: Get first date from current month
  @param d date
  @return first date from current month