获取前后七天
@param num   7：后七天     -7：前七天
@return
352385
public static String getPreOrNextDay(Date date,int num) {
        Calendar   ca   =   Calendar.getInstance();
        ca.setTime(date);
        ca.add(Calendar.DAY_OF_MONTH,  num);//此处要用add方法
        Date   firstDate   =   ca.getTime();
        return dateToString(firstDate);
    }
1145876
@Override
    protected PlainDate getDate0(int year) {

        int month = this.getMonthValue();
        int ref = GregorianMath.getDayOfWeek(year, month, this.dayOfMonth);
        PlainDate result = PlainDate.of(year, month, this.dayOfMonth);

        if (ref == this.dayOfWeek) {
            return result;
        }

        int delta = (ref - this.dayOfWeek);
        int sgn = -1;

        if (this.after) {
            delta = -delta;
            sgn = 1;
        }

        if (delta < 0) {
            delta += 7;
        }

        return result.plus(delta * sgn, DAYS);

    }
567245
public static Date getNextDay(Date dt, Long n) {

        Calendar cal = new GregorianCalendar();
        cal.setTime(dt);

        return new GregorianCalendar(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH),
                                        cal.get(Calendar.DAY_OF_MONTH) + n.intValue()).getTime();

    }
235141
private static int wordToNumber(String s){
		if(s.equals("零")||s.equals("0"))
			return 0;
		else if(s.equals("一")||s.equals("1"))
			return 1;
		else if(s.equals("二")||s.equals("两")||s.equals("2"))
			return 2;
		else if(s.equals("三")||s.equals("3"))
			return 3;
		else if(s.equals("四")||s.equals("4"))
			return 4;
		else if(s.equals("五")||s.equals("5"))
			return 5;
		else if(s.equals("六")||s.equals("6"))
			return 6;
		else if(s.equals("七")||s.equals("天")||s.equals("日")||s.equals("7"))
			return 7;
		else if(s.equals("八")||s.equals("8"))
			return 8;
		else if(s.equals("九")||s.equals("9"))
			return 9;
		else return -1;
	}
596412
function stringToRegularHolidays (value) {
  var regular = {};
  value = value.split(',').map(x => x.trim());

  // 曜日
  regular.week = makeMap(getWeekIndex(value) || []);

  // 日
  var day = value.map(x => REG_NUM.test(x) ? x * 1 : 0)
                 .filter(x => 1 <= x && x <= 31);
  regular.day = makeMap(day);

  // 第nw曜日
  var xweek = value.map(x => {
    var m = x.match(REG_NUMYOBI);
    if (m) {
      var n = +m[1];
      n = 5 < n ? 5 : n;
      var w = getWeekIndex(m[2]);
      if (1 <= n && w !== null) {
        return n + '-' + w;
      }
    }
    return null;
  }).filter(x => x);
  regular.xweek = makeMap(xweek);
  return regular;
}
476536
int getDayOfWeek(Calendar calendar) {
        int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK) - firstDayOfWeekToDraw;
        dayOfWeek = dayOfWeek < 0 ? 7 + dayOfWeek: dayOfWeek;
        return dayOfWeek;
    }
735818
static function num2week($num, $two = true)
    {
        if ($num == '6')
        {
            $num = '日';
        }
        else
        {
            $num = Tool::num2han($num + 1);
        }
        if ($two)
        {
            return self::WEEK_TWO . $num;
        }
        else
        {
            return self::WEEK_THREE . $num;
        }
    }
130755
public int days() {
        if (isInfinite()) {
            return 0;
        }
        Period p = new Period(asInterval(), PeriodType.days());
        return p.getDays();
    }
40022
public NumberExpression<Integer> dayOfYear() {
        if (dayOfYear == null) {
            dayOfYear = Expressions.numberOperation(Integer.class, Ops.DateTimeOps.DAY_OF_YEAR, mixin);
        }
        return dayOfYear;
    }
1312804
def number_to_day(self, day_number):
        
        return [
            calendar.day_name[6],
            calendar.day_name[0],
            calendar.day_name[1],
            calendar.day_name[2],
            calendar.day_name[3],
            calendar.day_name[4],
            calendar.day_name[5]
        ][day_number]
464381
public java.util.Map<String, String> getMonday() {
        if (monday == null) {
            monday = new com.amazonaws.internal.SdkInternalMap<String, String>();
        }
        return monday;
    }
503246
public static String formatNumber(int num) {
        DecimalFormat format = new DecimalFormat();
        format.setDecimalSeparatorAlwaysShown(false);
        return format.format(num);
    }
678584
private static function getDayNames($day, $shorten = false, $len = 1, $numeric = false)
    {
        $days = ['sat' => [1, 'شنبه'], 'sun' => [2, 'یکشنبه'], 'mon' => [3, 'دوشنبه'], 'tue' => [4, 'سه شنبه'], 'wed' => [5, 'چهارشنبه'], 'thu' => [6, 'پنجشنبه'], 'fri' => [7, 'جمعه']];
        $day = substr(strtolower($day), 0, 3);
        $day = $days[ $day ];

        return ($numeric) ? $day[0] : (($shorten) ? self::substr($day[1], 0, $len) : $day[1]);
    }
1359650
public long toNanoOfDay() {
        long total = hour * NANOS_PER_HOUR;
        total += minute * NANOS_PER_MINUTE;
        total += second * NANOS_PER_SECOND;
        total += nano;
        return total;
    }
1191751
public Number getMinutesPerYear()
   {
      return Integer.valueOf(NumberHelper.getInt(getMinutesPerDay()) * NumberHelper.getInt(getDaysPerMonth()) * 12);
   }
462443
public int numOccurrences(int year, int month, int day) {
        DateTimeFormatter parser = ISODateTimeFormat.date();
        DateTime date = parser.parseDateTime(year + "-" + month + "-" + "01");
        Calendar cal = Calendar.getInstance();
        cal.setTime(date.toDate());
        GregorianChronology calendar = GregorianChronology.getInstance();
        DateTimeField field = calendar.dayOfMonth();

        int days = 0;
        int count = 0;
        int num = field.getMaximumValue(new LocalDate(year, month, day, calendar));
        while (days < num) {
            if (cal.get(Calendar.DAY_OF_WEEK) == day) {
                count++;
            }
            date = date.plusDays(1);
            cal.setTime(date.toDate());

            days++;
        }
        return count;
    }
303519
public com.google.type.Date getDateValue() {
    if (typeCase_ == 7) {
      return (com.google.type.Date) type_;
    }
    return com.google.type.Date.getDefaultInstance();
  }