System.Globalization.ThaiBuddhistCalendar.GetYear C# (CSharp) Method

GetYear() public method

public GetYear ( System.DateTime time ) : int
time System.DateTime
return int
        public override int GetYear(DateTime time) {
            return (helper.GetYear(time));
        }

Usage Example

 public void PosTest2()
 {
     System.Globalization.Calendar tbc = new ThaiBuddhistCalendar();
     Random rand = new Random(-55);
     int year = rand.Next(tbc.GetYear(tbc.MinSupportedDateTime), tbc.GetYear(tbc.MaxSupportedDateTime));
     Assert.Equal(year, tbc.ToFourDigitYear(year));
 }
All Usage Examples Of System.Globalization.ThaiBuddhistCalendar::GetYear