Fixed Olympiad Sunday only period reseting to Monday.
Contributed by Sahar.
This commit is contained in:
@@ -721,9 +721,26 @@ public class Olympiad extends ListenersContainer
|
|||||||
private long setNewCompBegin()
|
private long setNewCompBegin()
|
||||||
{
|
{
|
||||||
_compStart = Calendar.getInstance();
|
_compStart = Calendar.getInstance();
|
||||||
|
|
||||||
|
int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
||||||
|
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
||||||
|
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
||||||
|
|
||||||
|
// Today's competitions ended, start checking from next day.
|
||||||
|
if (currentDay == _compStart.get(Calendar.DAY_OF_WEEK))
|
||||||
|
{
|
||||||
|
if (currentDay == Calendar.SATURDAY)
|
||||||
|
{
|
||||||
|
currentDay = Calendar.SUNDAY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentDay++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (Config.ALT_OLY_USE_CUSTOM_PERIOD_SETTINGS)
|
if (Config.ALT_OLY_USE_CUSTOM_PERIOD_SETTINGS)
|
||||||
{
|
{
|
||||||
final int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
|
||||||
boolean dayFound = false;
|
boolean dayFound = false;
|
||||||
int dayCounter = 0;
|
int dayCounter = 0;
|
||||||
for (int i = currentDay; i < 8; i++)
|
for (int i = currentDay; i < 8; i++)
|
||||||
@@ -751,8 +768,6 @@ public class Olympiad extends ListenersContainer
|
|||||||
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
|
||||||
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
|
||||||
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
||||||
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
||||||
|
|
||||||
|
@@ -721,9 +721,26 @@ public class Olympiad extends ListenersContainer
|
|||||||
private long setNewCompBegin()
|
private long setNewCompBegin()
|
||||||
{
|
{
|
||||||
_compStart = Calendar.getInstance();
|
_compStart = Calendar.getInstance();
|
||||||
|
|
||||||
|
int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
||||||
|
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
||||||
|
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
||||||
|
|
||||||
|
// Today's competitions ended, start checking from next day.
|
||||||
|
if (currentDay == _compStart.get(Calendar.DAY_OF_WEEK))
|
||||||
|
{
|
||||||
|
if (currentDay == Calendar.SATURDAY)
|
||||||
|
{
|
||||||
|
currentDay = Calendar.SUNDAY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentDay++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (Config.ALT_OLY_USE_CUSTOM_PERIOD_SETTINGS)
|
if (Config.ALT_OLY_USE_CUSTOM_PERIOD_SETTINGS)
|
||||||
{
|
{
|
||||||
final int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
|
||||||
boolean dayFound = false;
|
boolean dayFound = false;
|
||||||
int dayCounter = 0;
|
int dayCounter = 0;
|
||||||
for (int i = currentDay; i < 8; i++)
|
for (int i = currentDay; i < 8; i++)
|
||||||
@@ -751,8 +768,6 @@ public class Olympiad extends ListenersContainer
|
|||||||
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
|
||||||
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
|
||||||
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
||||||
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
||||||
|
|
||||||
|
@@ -721,9 +721,26 @@ public class Olympiad extends ListenersContainer
|
|||||||
private long setNewCompBegin()
|
private long setNewCompBegin()
|
||||||
{
|
{
|
||||||
_compStart = Calendar.getInstance();
|
_compStart = Calendar.getInstance();
|
||||||
|
|
||||||
|
int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
||||||
|
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
||||||
|
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
||||||
|
|
||||||
|
// Today's competitions ended, start checking from next day.
|
||||||
|
if (currentDay == _compStart.get(Calendar.DAY_OF_WEEK))
|
||||||
|
{
|
||||||
|
if (currentDay == Calendar.SATURDAY)
|
||||||
|
{
|
||||||
|
currentDay = Calendar.SUNDAY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentDay++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (Config.ALT_OLY_USE_CUSTOM_PERIOD_SETTINGS)
|
if (Config.ALT_OLY_USE_CUSTOM_PERIOD_SETTINGS)
|
||||||
{
|
{
|
||||||
final int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
|
||||||
boolean dayFound = false;
|
boolean dayFound = false;
|
||||||
int dayCounter = 0;
|
int dayCounter = 0;
|
||||||
for (int i = currentDay; i < 8; i++)
|
for (int i = currentDay; i < 8; i++)
|
||||||
@@ -751,8 +768,6 @@ public class Olympiad extends ListenersContainer
|
|||||||
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
|
||||||
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
|
||||||
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
||||||
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
||||||
|
|
||||||
|
@@ -695,7 +695,24 @@ public class Olympiad extends ListenersContainer
|
|||||||
private long setNewCompBegin()
|
private long setNewCompBegin()
|
||||||
{
|
{
|
||||||
_compStart = Calendar.getInstance();
|
_compStart = Calendar.getInstance();
|
||||||
final int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
|
||||||
|
int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
||||||
|
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
||||||
|
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
||||||
|
|
||||||
|
// Today's competitions ended, start checking from next day.
|
||||||
|
if (currentDay == _compStart.get(Calendar.DAY_OF_WEEK))
|
||||||
|
{
|
||||||
|
if (currentDay == Calendar.SATURDAY)
|
||||||
|
{
|
||||||
|
currentDay = Calendar.SUNDAY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentDay++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
boolean dayFound = false;
|
boolean dayFound = false;
|
||||||
int dayCounter = 0;
|
int dayCounter = 0;
|
||||||
for (int i = currentDay; i < 8; i++)
|
for (int i = currentDay; i < 8; i++)
|
||||||
@@ -722,8 +739,6 @@ public class Olympiad extends ListenersContainer
|
|||||||
{
|
{
|
||||||
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
||||||
}
|
}
|
||||||
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
|
||||||
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
|
||||||
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
||||||
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
||||||
|
|
||||||
|
@@ -695,7 +695,24 @@ public class Olympiad extends ListenersContainer
|
|||||||
private long setNewCompBegin()
|
private long setNewCompBegin()
|
||||||
{
|
{
|
||||||
_compStart = Calendar.getInstance();
|
_compStart = Calendar.getInstance();
|
||||||
final int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
|
||||||
|
int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
||||||
|
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
||||||
|
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
||||||
|
|
||||||
|
// Today's competitions ended, start checking from next day.
|
||||||
|
if (currentDay == _compStart.get(Calendar.DAY_OF_WEEK))
|
||||||
|
{
|
||||||
|
if (currentDay == Calendar.SATURDAY)
|
||||||
|
{
|
||||||
|
currentDay = Calendar.SUNDAY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentDay++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
boolean dayFound = false;
|
boolean dayFound = false;
|
||||||
int dayCounter = 0;
|
int dayCounter = 0;
|
||||||
for (int i = currentDay; i < 8; i++)
|
for (int i = currentDay; i < 8; i++)
|
||||||
@@ -722,8 +739,6 @@ public class Olympiad extends ListenersContainer
|
|||||||
{
|
{
|
||||||
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
||||||
}
|
}
|
||||||
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
|
||||||
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
|
||||||
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
||||||
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
||||||
|
|
||||||
|
@@ -695,7 +695,24 @@ public class Olympiad extends ListenersContainer
|
|||||||
private long setNewCompBegin()
|
private long setNewCompBegin()
|
||||||
{
|
{
|
||||||
_compStart = Calendar.getInstance();
|
_compStart = Calendar.getInstance();
|
||||||
final int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
|
||||||
|
int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
||||||
|
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
||||||
|
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
||||||
|
|
||||||
|
// Today's competitions ended, start checking from next day.
|
||||||
|
if (currentDay == _compStart.get(Calendar.DAY_OF_WEEK))
|
||||||
|
{
|
||||||
|
if (currentDay == Calendar.SATURDAY)
|
||||||
|
{
|
||||||
|
currentDay = Calendar.SUNDAY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentDay++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
boolean dayFound = false;
|
boolean dayFound = false;
|
||||||
int dayCounter = 0;
|
int dayCounter = 0;
|
||||||
for (int i = currentDay; i < 8; i++)
|
for (int i = currentDay; i < 8; i++)
|
||||||
@@ -722,8 +739,6 @@ public class Olympiad extends ListenersContainer
|
|||||||
{
|
{
|
||||||
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
||||||
}
|
}
|
||||||
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
|
||||||
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
|
||||||
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
||||||
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
||||||
|
|
||||||
|
@@ -695,7 +695,24 @@ public class Olympiad extends ListenersContainer
|
|||||||
private long setNewCompBegin()
|
private long setNewCompBegin()
|
||||||
{
|
{
|
||||||
_compStart = Calendar.getInstance();
|
_compStart = Calendar.getInstance();
|
||||||
final int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
|
||||||
|
int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
||||||
|
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
||||||
|
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
||||||
|
|
||||||
|
// Today's competitions ended, start checking from next day.
|
||||||
|
if (currentDay == _compStart.get(Calendar.DAY_OF_WEEK))
|
||||||
|
{
|
||||||
|
if (currentDay == Calendar.SATURDAY)
|
||||||
|
{
|
||||||
|
currentDay = Calendar.SUNDAY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentDay++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
boolean dayFound = false;
|
boolean dayFound = false;
|
||||||
int dayCounter = 0;
|
int dayCounter = 0;
|
||||||
for (int i = currentDay; i < 8; i++)
|
for (int i = currentDay; i < 8; i++)
|
||||||
@@ -722,8 +739,6 @@ public class Olympiad extends ListenersContainer
|
|||||||
{
|
{
|
||||||
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
||||||
}
|
}
|
||||||
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
|
||||||
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
|
||||||
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
||||||
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
||||||
|
|
||||||
|
@@ -695,7 +695,24 @@ public class Olympiad extends ListenersContainer
|
|||||||
private long setNewCompBegin()
|
private long setNewCompBegin()
|
||||||
{
|
{
|
||||||
_compStart = Calendar.getInstance();
|
_compStart = Calendar.getInstance();
|
||||||
final int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
|
||||||
|
int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
||||||
|
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
||||||
|
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
||||||
|
|
||||||
|
// Today's competitions ended, start checking from next day.
|
||||||
|
if (currentDay == _compStart.get(Calendar.DAY_OF_WEEK))
|
||||||
|
{
|
||||||
|
if (currentDay == Calendar.SATURDAY)
|
||||||
|
{
|
||||||
|
currentDay = Calendar.SUNDAY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentDay++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
boolean dayFound = false;
|
boolean dayFound = false;
|
||||||
int dayCounter = 0;
|
int dayCounter = 0;
|
||||||
for (int i = currentDay; i < 8; i++)
|
for (int i = currentDay; i < 8; i++)
|
||||||
@@ -722,8 +739,6 @@ public class Olympiad extends ListenersContainer
|
|||||||
{
|
{
|
||||||
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
||||||
}
|
}
|
||||||
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
|
||||||
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
|
||||||
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
||||||
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
||||||
|
|
||||||
|
@@ -914,9 +914,26 @@ public class Olympiad
|
|||||||
private long setNewCompBegin()
|
private long setNewCompBegin()
|
||||||
{
|
{
|
||||||
_compStart = Calendar.getInstance();
|
_compStart = Calendar.getInstance();
|
||||||
|
|
||||||
|
int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
||||||
|
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
||||||
|
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
||||||
|
|
||||||
|
// Today's competitions ended, start checking from next day.
|
||||||
|
if (currentDay == _compStart.get(Calendar.DAY_OF_WEEK))
|
||||||
|
{
|
||||||
|
if (currentDay == Calendar.SATURDAY)
|
||||||
|
{
|
||||||
|
currentDay = Calendar.SUNDAY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentDay++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (Config.ALT_OLY_USE_CUSTOM_PERIOD_SETTINGS)
|
if (Config.ALT_OLY_USE_CUSTOM_PERIOD_SETTINGS)
|
||||||
{
|
{
|
||||||
final int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
|
||||||
boolean dayFound = false;
|
boolean dayFound = false;
|
||||||
int dayCounter = 0;
|
int dayCounter = 0;
|
||||||
for (int i = currentDay; i < 8; i++)
|
for (int i = currentDay; i < 8; i++)
|
||||||
@@ -944,8 +961,6 @@ public class Olympiad
|
|||||||
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
|
||||||
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
|
||||||
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
||||||
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
||||||
|
|
||||||
|
@@ -756,9 +756,26 @@ public class Olympiad extends ListenersContainer
|
|||||||
private long setNewCompBegin()
|
private long setNewCompBegin()
|
||||||
{
|
{
|
||||||
_compStart = Calendar.getInstance();
|
_compStart = Calendar.getInstance();
|
||||||
|
|
||||||
|
int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
||||||
|
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
||||||
|
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
||||||
|
|
||||||
|
// Today's competitions ended, start checking from next day.
|
||||||
|
if (currentDay == _compStart.get(Calendar.DAY_OF_WEEK))
|
||||||
|
{
|
||||||
|
if (currentDay == Calendar.SATURDAY)
|
||||||
|
{
|
||||||
|
currentDay = Calendar.SUNDAY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentDay++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (Config.ALT_OLY_USE_CUSTOM_PERIOD_SETTINGS)
|
if (Config.ALT_OLY_USE_CUSTOM_PERIOD_SETTINGS)
|
||||||
{
|
{
|
||||||
final int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
|
||||||
boolean dayFound = false;
|
boolean dayFound = false;
|
||||||
int dayCounter = 0;
|
int dayCounter = 0;
|
||||||
for (int i = currentDay; i < 8; i++)
|
for (int i = currentDay; i < 8; i++)
|
||||||
@@ -786,8 +803,6 @@ public class Olympiad extends ListenersContainer
|
|||||||
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
|
||||||
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
|
||||||
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
||||||
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
||||||
|
|
||||||
|
@@ -697,7 +697,24 @@ public class Olympiad extends ListenersContainer
|
|||||||
private long setNewCompBegin()
|
private long setNewCompBegin()
|
||||||
{
|
{
|
||||||
_compStart = Calendar.getInstance();
|
_compStart = Calendar.getInstance();
|
||||||
final int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
|
||||||
|
int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
||||||
|
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
||||||
|
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
||||||
|
|
||||||
|
// Today's competitions ended, start checking from next day.
|
||||||
|
if (currentDay == _compStart.get(Calendar.DAY_OF_WEEK))
|
||||||
|
{
|
||||||
|
if (currentDay == Calendar.SATURDAY)
|
||||||
|
{
|
||||||
|
currentDay = Calendar.SUNDAY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentDay++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
boolean dayFound = false;
|
boolean dayFound = false;
|
||||||
int dayCounter = 0;
|
int dayCounter = 0;
|
||||||
for (int i = currentDay; i < 8; i++)
|
for (int i = currentDay; i < 8; i++)
|
||||||
@@ -724,8 +741,6 @@ public class Olympiad extends ListenersContainer
|
|||||||
{
|
{
|
||||||
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
||||||
}
|
}
|
||||||
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
|
||||||
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
|
||||||
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
||||||
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
||||||
|
|
||||||
|
@@ -697,7 +697,24 @@ public class Olympiad extends ListenersContainer
|
|||||||
private long setNewCompBegin()
|
private long setNewCompBegin()
|
||||||
{
|
{
|
||||||
_compStart = Calendar.getInstance();
|
_compStart = Calendar.getInstance();
|
||||||
final int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
|
||||||
|
int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
||||||
|
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
||||||
|
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
||||||
|
|
||||||
|
// Today's competitions ended, start checking from next day.
|
||||||
|
if (currentDay == _compStart.get(Calendar.DAY_OF_WEEK))
|
||||||
|
{
|
||||||
|
if (currentDay == Calendar.SATURDAY)
|
||||||
|
{
|
||||||
|
currentDay = Calendar.SUNDAY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentDay++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
boolean dayFound = false;
|
boolean dayFound = false;
|
||||||
int dayCounter = 0;
|
int dayCounter = 0;
|
||||||
for (int i = currentDay; i < 8; i++)
|
for (int i = currentDay; i < 8; i++)
|
||||||
@@ -724,8 +741,6 @@ public class Olympiad extends ListenersContainer
|
|||||||
{
|
{
|
||||||
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
||||||
}
|
}
|
||||||
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
|
||||||
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
|
||||||
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
||||||
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
||||||
|
|
||||||
|
@@ -697,7 +697,24 @@ public class Olympiad extends ListenersContainer
|
|||||||
private long setNewCompBegin()
|
private long setNewCompBegin()
|
||||||
{
|
{
|
||||||
_compStart = Calendar.getInstance();
|
_compStart = Calendar.getInstance();
|
||||||
final int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
|
||||||
|
int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
||||||
|
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
||||||
|
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
||||||
|
|
||||||
|
// Today's competitions ended, start checking from next day.
|
||||||
|
if (currentDay == _compStart.get(Calendar.DAY_OF_WEEK))
|
||||||
|
{
|
||||||
|
if (currentDay == Calendar.SATURDAY)
|
||||||
|
{
|
||||||
|
currentDay = Calendar.SUNDAY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentDay++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
boolean dayFound = false;
|
boolean dayFound = false;
|
||||||
int dayCounter = 0;
|
int dayCounter = 0;
|
||||||
for (int i = currentDay; i < 8; i++)
|
for (int i = currentDay; i < 8; i++)
|
||||||
@@ -724,8 +741,6 @@ public class Olympiad extends ListenersContainer
|
|||||||
{
|
{
|
||||||
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
||||||
}
|
}
|
||||||
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
|
||||||
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
|
||||||
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
||||||
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
||||||
|
|
||||||
|
@@ -697,7 +697,24 @@ public class Olympiad extends ListenersContainer
|
|||||||
private long setNewCompBegin()
|
private long setNewCompBegin()
|
||||||
{
|
{
|
||||||
_compStart = Calendar.getInstance();
|
_compStart = Calendar.getInstance();
|
||||||
final int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
|
||||||
|
int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
||||||
|
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
||||||
|
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
||||||
|
|
||||||
|
// Today's competitions ended, start checking from next day.
|
||||||
|
if (currentDay == _compStart.get(Calendar.DAY_OF_WEEK))
|
||||||
|
{
|
||||||
|
if (currentDay == Calendar.SATURDAY)
|
||||||
|
{
|
||||||
|
currentDay = Calendar.SUNDAY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentDay++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
boolean dayFound = false;
|
boolean dayFound = false;
|
||||||
int dayCounter = 0;
|
int dayCounter = 0;
|
||||||
for (int i = currentDay; i < 8; i++)
|
for (int i = currentDay; i < 8; i++)
|
||||||
@@ -724,8 +741,6 @@ public class Olympiad extends ListenersContainer
|
|||||||
{
|
{
|
||||||
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
||||||
}
|
}
|
||||||
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
|
||||||
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
|
||||||
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
||||||
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
||||||
|
|
||||||
|
@@ -697,7 +697,24 @@ public class Olympiad extends ListenersContainer
|
|||||||
private long setNewCompBegin()
|
private long setNewCompBegin()
|
||||||
{
|
{
|
||||||
_compStart = Calendar.getInstance();
|
_compStart = Calendar.getInstance();
|
||||||
final int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
|
||||||
|
int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
||||||
|
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
||||||
|
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
||||||
|
|
||||||
|
// Today's competitions ended, start checking from next day.
|
||||||
|
if (currentDay == _compStart.get(Calendar.DAY_OF_WEEK))
|
||||||
|
{
|
||||||
|
if (currentDay == Calendar.SATURDAY)
|
||||||
|
{
|
||||||
|
currentDay = Calendar.SUNDAY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentDay++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
boolean dayFound = false;
|
boolean dayFound = false;
|
||||||
int dayCounter = 0;
|
int dayCounter = 0;
|
||||||
for (int i = currentDay; i < 8; i++)
|
for (int i = currentDay; i < 8; i++)
|
||||||
@@ -724,8 +741,6 @@ public class Olympiad extends ListenersContainer
|
|||||||
{
|
{
|
||||||
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
||||||
}
|
}
|
||||||
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
|
||||||
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
|
||||||
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
||||||
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
||||||
|
|
||||||
|
@@ -697,7 +697,24 @@ public class Olympiad extends ListenersContainer
|
|||||||
private long setNewCompBegin()
|
private long setNewCompBegin()
|
||||||
{
|
{
|
||||||
_compStart = Calendar.getInstance();
|
_compStart = Calendar.getInstance();
|
||||||
final int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
|
||||||
|
int currentDay = _compStart.get(Calendar.DAY_OF_WEEK);
|
||||||
|
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
||||||
|
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
||||||
|
|
||||||
|
// Today's competitions ended, start checking from next day.
|
||||||
|
if (currentDay == _compStart.get(Calendar.DAY_OF_WEEK))
|
||||||
|
{
|
||||||
|
if (currentDay == Calendar.SATURDAY)
|
||||||
|
{
|
||||||
|
currentDay = Calendar.SUNDAY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentDay++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
boolean dayFound = false;
|
boolean dayFound = false;
|
||||||
int dayCounter = 0;
|
int dayCounter = 0;
|
||||||
for (int i = currentDay; i < 8; i++)
|
for (int i = currentDay; i < 8; i++)
|
||||||
@@ -724,8 +741,6 @@ public class Olympiad extends ListenersContainer
|
|||||||
{
|
{
|
||||||
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
_compStart.add(Calendar.DAY_OF_MONTH, dayCounter);
|
||||||
}
|
}
|
||||||
_compStart.set(Calendar.HOUR_OF_DAY, COMP_START);
|
|
||||||
_compStart.set(Calendar.MINUTE, COMP_MIN);
|
|
||||||
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
_compStart.add(Calendar.HOUR_OF_DAY, 24);
|
||||||
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
_compEnd = _compStart.getTimeInMillis() + COMP_PERIOD;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user