zoukankan      html  css  js  c++  java
  • 开始日期结束日期获取中间所有月份

        public long[] findCustomerCoReg(StatisticsQuery query){        

         Date startDate = query.getStartDate();        

         Date endDate = query.getEndDate();        

         Calendar c = Calendar.getInstance();        

         List<Long> list = new ArrayList<Long>();

                SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");

               for(;startDate.getTime() <= endDate.getTime();){          

                Map<String, Object> params = new HashMap<String, Object>();            

                String _startDate = df.format(startDate);            

                       c.setTime(startDate);            

            c.add(Calendar.WEEK_OF_MONTH, 1);            

                       startDate = c.getTime();            

                       String _endDate = df.format(startDate);            

                       params.put("startDate", _startDate);            

                       params.put("endDate", _endDate);            

                       long l = customerMapper.findCustomerCoReg(params);            

                      list.add(l);        

               }       

               long[] ret = new long[list.size()];        

               for(int i =0; i < list.size(); i++){            

                          ret[i] = list.get(i);        

                }

                     return ret;    

    }

  • 相关阅读:
    陶哲轩实分析 习题 12.5.8 :度量空间中有界闭集不一定是紧集
    陶哲轩实分析 习题 12.5.12
    陶哲轩实分析 习题 12.5.4,12.5.5
    陶哲轩实分析 习题 12.5.10
    陶哲轩实分析 习题 12.5.4,12.5.5
    陶哲轩实分析 习题 12.5.10
    opencvDCT离散余弦变换
    opencvPCA主要成分分析
    opencvCanny边缘检测
    opencvdft离散傅立叶变换(把空域变成频域)
  • 原文地址:https://www.cnblogs.com/cuijinlong/p/6231796.html
Copyright © 2011-2022 走看看