|
@@ -14,14 +14,28 @@ namespace PDK_Concert
|
|
|
{
|
|
|
TimeSpan span = ConcertDate - DateTime.Today;
|
|
|
int daysDifference = (int)span.TotalDays;
|
|
|
- if (daysDifference == 1)
|
|
|
+ if (daysDifference == 1 || (daysDifference % 10 == 1))
|
|
|
{
|
|
|
return (string)("До начала концерта остался " + daysDifference + " день");
|
|
|
}
|
|
|
+ if(daysDifference == -1 || (daysDifference % 10 == -1))
|
|
|
+ {
|
|
|
+ daysDifference = daysDifference * (-1);
|
|
|
+ return (string)("Со дня концерта прошел " + daysDifference + " день");
|
|
|
+ }
|
|
|
if (daysDifference == 0)
|
|
|
{
|
|
|
return (string)("Концерт сегодня");
|
|
|
}
|
|
|
+ if(daysDifference == 12 || daysDifference == 13 ||daysDifference == 14)
|
|
|
+ {
|
|
|
+ if(daysDifference < 0)
|
|
|
+ {
|
|
|
+ daysDifference = daysDifference * (-1);
|
|
|
+ return (string)("Со дня концерта прошло " + daysDifference + " дней");
|
|
|
+ }
|
|
|
+ return (string)("До начала концерта осталось " + daysDifference + " дней");
|
|
|
+ }
|
|
|
if ((daysDifference % 10 == 2)||(daysDifference % 10 == 3)||(daysDifference % 10 == 4)||(daysDifference % 10 == -2)||(daysDifference % 10 == -3)||(daysDifference % 10 == -4))
|
|
|
{
|
|
|
if (daysDifference < 0)
|