- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
private string CalculateDecadeOrYear(string year)
{
string decade = year.Remove(3) + "0";
string currentYear = DateTime.Now.Year.ToString();
string currentDecade = currentYear.Remove(3) + "0";
string prevDecade = ((Convert.ToInt32(currentYear.Remove(3)) - 1)).ToString() + "0";
if (!(decade == currentDecade) && !(decade == prevDecade))
{
return decade;
}
return year;
}