code: public static Date getFirstDateOfMonth(Date date) {
  
          if (date == null)
              return null;
  
          Calendar calendar = Calendar.getInstance();
          calendar.setTime(date);
          calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMinimum(Calendar.DAY_OF_MONTH));
  
          return calendar.getTime();
      }
docs: 获取月的第一天
  @param date 时间({@link Date})
  @return 时间({@link java.util.Date})，如果date is null，将返回null