/** * Creates a time period representing the week in the specified year. * * @param week the week (1 to 53). * @param year the year (1900 to 9999). */ public Week(int week, int year) { if ((week < FIRST_WEEK_IN_YEAR) && (week > LAST_WEEK_IN_YEAR)) { throw new IllegalArgumentException( "The 'week' argument must be in the range 1 - 53."); } this.week = (byte) week; this.year = (short) year; peg(Calendar.getInstance()); }
/** * Creates a time period representing the week in the specified year. * * @param week the week (1 to 53). * @param year the year (1900 to 9999). */ public Week(int week, int year) { if ((week < FIRST_WEEK_IN_YEAR) && (week > LAST_WEEK_IN_YEAR)) { throw new IllegalArgumentException( "The 'week' argument must be in the range 1 - 53."); } this.week = (byte) week; this.year = (short) year; peg(Calendar.getInstance()); }
/** * Creates a time period representing the week in the specified year. * * @param week the week (1 to 53). * @param year the year (1900 to 9999). */ public Week(int week, Year year) { if ((week < FIRST_WEEK_IN_YEAR) && (week > LAST_WEEK_IN_YEAR)) { throw new IllegalArgumentException( "The 'week' argument must be in the range 1 - 53."); } this.week = (byte) week; this.year = (short) year.getYear(); peg(Calendar.getInstance()); }
/** * Creates a time period representing the week in the specified year. * * @param week the week (1 to 53). * @param year the year (1900 to 9999). */ public Week(int week, Year year) { if ((week < FIRST_WEEK_IN_YEAR) && (week > LAST_WEEK_IN_YEAR)) { throw new IllegalArgumentException( "The 'week' argument must be in the range 1 - 53."); } this.week = (byte) week; this.year = (short) year.getYear(); peg(Calendar.getInstance()); }
peg(calendar);