Beispiel #1
0
 public Month(int month, Year year)
 {
   Month month1 = this;
   if (month < 1 || month > 12)
   {
     string str = "Month outside valid range.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     this.month = month;
     this.year = year.getYear();
     this.peg(Calendar.getInstance());
   }
 }
Beispiel #2
0
 public Quarter(int quarter, Year year)
 {
   Quarter quarter1 = this;
   if (quarter < 1 || quarter > 4)
   {
     string str = "Quarter outside valid range.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     this.year = (short) year.getYear();
     this.quarter = (byte) quarter;
     this.peg(Calendar.getInstance());
   }
 }
Beispiel #3
0
 public Week(int week, Year year)
 {
   Week week1 = this;
   if (week < 1 && week > 53)
   {
     string str = "The 'week' argument must be in the range 1 - 53.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     this.week = (byte) week;
     this.year = (short) year.getYear();
     this.peg(Calendar.getInstance());
   }
 }