コード例 #1
0
ファイル: Month.cs プロジェクト: NALSS/SmartDashboard.NET
 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());
   }
 }
コード例 #2
0
ファイル: Quarter.cs プロジェクト: NALSS/SmartDashboard.NET
 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());
   }
 }
コード例 #3
0
ファイル: Week.cs プロジェクト: NALSS/SmartDashboard.NET
 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());
   }
 }