Convert weeks to milliseconds.

@param weeks number of weeks to convert.
@return the number of milliseconds in <code>weeks</code>
503091
@Pure
	@Inline(value = "(long) (($1).doubleValue() * $2.MILLIS_IN_WEEK)", imported = {TimeExtensions.class})
	public static long weeks(Number weeks) {
		return (long) (weeks.doubleValue() * MILLIS_IN_WEEK);
	}
916123
function getWeekNumber(date) {
  date = this.toDate(date);
  var week = this._startWeek;
  return date ? getWeekNumberFn(date, week, this.startMonth): null;
}
629873
long getFirstWeekOfYearMillis(int year) {
        long jan1millis = getYearMillis(year);
        int jan1dayOfWeek = getDayOfWeek(jan1millis);
        
        if (jan1dayOfWeek > (8 - iMinDaysInFirstWeek)) {
            // First week is end of previous year because it doesn't have enough days.
            return jan1millis + (8 - jan1dayOfWeek)
                * (long)DateTimeConstants.MILLIS_PER_DAY;
        } else {
            // First week is start of this year because it has enough days.
            return jan1millis - (jan1dayOfWeek - 1)
                * (long)DateTimeConstants.MILLIS_PER_DAY;
        }
    }
668187
public static long toDurationMillis(String duration) {
		Matcher matcher = NUMBER_AND_UNIT.matcher(duration);

		if (!matcher.matches()) {
			throw new IllegalArgumentException("malformed duration string: " + duration);
		}

		long number = Long.parseLong(matcher.group(1));
		String unitStr = matcher.group(2);
		if (unitStr == null) {
			return number;
		}

		char unit = unitStr.toLowerCase().charAt(0);

		switch (unit) {
			case 's':
				return number * MILLIS_PER_SECOND;
			case 'm':
				// if it's an m, could be 'minutes' or 'millis'. default minutes
				if (unitStr.length() >= 2 && unitStr.charAt(1) == 's') {
					return number;
				}

				return number * MILLIS_PER_MINUTE;
			case 'h':
				return number * MILLIS_PER_HOUR;
			case 'd':
				return number * MILLIS_PER_DAY;
			default:
				throw new IllegalArgumentException("unknown time unit :" + unit);
		}
	}
386787
public static int getWeekDay(final long time) {
        final Calendar calendar = Calendar.getInstance();
        calendar.setTimeInMillis(time);
        int ret = calendar.get(Calendar.DAY_OF_WEEK) - 1;
        if (ret <= 0) {
            ret = 7;
        }

        return ret;
    }
476536
int getDayOfWeek(Calendar calendar) {
        int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK) - firstDayOfWeekToDraw;
        dayOfWeek = dayOfWeek < 0 ? 7 + dayOfWeek: dayOfWeek;
        return dayOfWeek;
    }
901127
public int millisecondsToX(long milliseconds) {
        if (autoScroll.get()) {
            int playHead = (getWidth() / 2) + 2;
            long offset = milliseconds - getFurthestPlaybackPosition();
            return playHead + (Util.timeToHalfFrame(offset) / scale.get());
        }
        return Util.timeToHalfFrame(milliseconds) / scale.get();
    }
756188
def get_last_weeks(number_of_weeks):
    """"""
    time_now = datetime.now()
    year = time_now.isocalendar()[0]
    week = time_now.isocalendar()[1]
    weeks = []
    for i in range(0, number_of_weeks):
        start = get_week_dates(year, week - i, as_timestamp=True)[0]
        n_year, n_week = get_year_week(start)
        weeks.append((n_year, n_week))

    return weeks
1342478
function toSeconds() {
      var seconds = this.seconds + 60 * this.minutes + 3600 * this.hours +
                    86400 * this.days + 7 * 86400 * this.weeks;
      return (this.isNegative ? -seconds : seconds);
    }
141992
public final void setWeeksOfMonth(SortedSet<WeekOfMonth> weeksOfMonth) {

        m_weeksOfMonth.clear();
        if (null != weeksOfMonth) {
            m_weeksOfMonth.addAll(weeksOfMonth);
        }

    }
11705
public CalendarWeek minus(Weeks weeks) {

        if (weeks.isEmpty()) {
            return this;
        }

        PlainDate date = this.start.getTemporal().minus(weeks.getAmount(), CalendarUnit.WEEKS);
        int y = date.getInt(YEAR_OF_WEEKDATE);
        int w = date.getInt(WEEK_OF_YEAR);
        return CalendarWeek.of(y, w);

    }
762695
def week(self):
        ''''''
        self.magnification = 345600
        self._update(self.baseNumber, self.magnification)
        return self
554093
public DateCalculator<LocalDate> setWorkingWeek(final WorkingWeek week) {
        if (week instanceof JodaWorkingWeek) {
            workingWeek = (JodaWorkingWeek) week;
            return this;
        }
        throw new IllegalArgumentException("Please give an instance of JodaWorkingWeek");
    }
206869
public static Date plusWeeks(Date date, int weeks) {
		return plus(date, weeks, DateTimeField.WEEKS);
	}
524963
public String toClock()
	{
		StringBuilder s = new StringBuilder();

		s.append(((this.weeks * 7 + this.days) * 24 + this.hours) + ":");
		if (this.minutes < 10) {
			s.append('0');
		}
		s.append(this.minutes + ":");
		if (this.seconds < 10) {
			s.append('0');
		}
		s.append(this.seconds + ".");
		if (this.milliseconds < 100) {
			s.append('0');
		}
		if (this.milliseconds < 10) {
			s.append('0');
		}
		s.append(this.milliseconds);

		return s.toString();
	}
468755
public static Date addWeeks(Date d, int weeks) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(d);
        cal.add(Calendar.WEEK_OF_YEAR, weeks);
        return cal.getTime();
    }
717413
public NumberExpression<Integer> dayOfWeek() {
        if (dayOfWeek == null) {
            dayOfWeek = Expressions.numberOperation(Integer.class, Ops.DateTimeOps.DAY_OF_WEEK, mixin);
        }
        return dayOfWeek;
    }