public static Date[] weeks(long base, int offL, int offR) {
        int from = Math.min(offL, offR);
        int len = Math.abs(offL - offR);
        // 现在
        Calendar c = Calendar.getInstance();
        c.setTimeInMillis(base);

        Date[] re = new Date[2];

        // 计算开始
        c.add(Calendar.DAY_OF_YEAR, 7 * from);
        c.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
        c.set(Calendar.HOUR_OF_DAY, 0);
        c.set(Calendar.MINUTE, 0);
        c.set(Calendar.SECOND, 0);
        c.set(Calendar.MILLISECOND, 0);
        re[0] = c.getTime();

        // 计算结束
        c.add(Calendar.DAY_OF_YEAR, 7 * (len + 1));
        c.add(Calendar.MILLISECOND, -1);
        re[1] = c.getTime();

        // 返回
        return re;
    }
public static Date[] weeks(long base, int offL, int offR) {
        int from = Math.min(offL, offR);
        int len = Math.abs(offL - offR);
        
        Calendar c = Calendar.getInstance();
        c.setTimeInMillis(base);

        Date[] re = new Date[2];

        
        c.add(Calendar.DAY_OF_YEAR, 7 * from);
        c.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
        c.set(Calendar.HOUR_OF_DAY, 0);
        c.set(Calendar.MINUTE, 0);
        c.set(Calendar.SECOND, 0);
        c.set(Calendar.MILLISECOND, 0);
        re[0] = c.getTime();

        
        c.add(Calendar.DAY_OF_YEAR, 7 * (len + 1));
        c.add(Calendar.MILLISECOND, -1);
        re[1] = c.getTime();

        
        return re;
    }
public static Date [ ] weeks ( long base , int offL , int offR ) { int from = Math . min ( offL , offR ) ; int len = Math . abs ( offL - offR ) ; // 现在
 Calendar c = Calendar . getInstance ( ) ; c . setTimeInMillis ( base ) ; Date [ ] re = new Date [ 2 ] ; // 计算开始
 c . add ( Calendar . DAY_OF_YEAR , 7 * from ) ; c . set ( Calendar . DAY_OF_WEEK , Calendar . MONDAY ) ; c . set ( Calendar . HOUR_OF_DAY , 0 ) ; c . set ( Calendar . MINUTE , 0 ) ; c . set ( Calendar . SECOND , 0 ) ; c . set ( Calendar . MILLISECOND , 0 ) ; re [ 0 ] = c . getTime ( ) ; // 计算结束
 c . add ( Calendar . DAY_OF_YEAR , 7 * ( len + 1 ) ) ; c . add ( Calendar . MILLISECOND , - 1 ) ; re [ 1 ] = c . getTime ( ) ; // 返回
 return re ; }
按周获得某几周周一 00:00:00 到周六 的时间范围
<p>
它会根据给定的 offL 和 offR 得到一个时间范围
<p>
对本函数来说 week(-3,-5) 和 week(-5,-3) 是一个意思

@param base
基础时间，毫秒
@param offL
从本周偏移几周， 0 表示本周，-1 表示上一周，1 表示下一周
@param offR
从本周偏移几周， 0 表示本周，-1 表示上一周，1 表示下一周

@return 时间范围(毫秒级别)
按周获得某几周周一 00 : 00 : 00 到周六 的时间范围 <p > 它会根据给定的 offL 和 offR 得到一个时间范围 <p > 对本函数来说 week ( - 3 - 5 ) 和 week ( - 5 - 3 ) 是一个意思