我正在尝试检查日期以放置适当的分隔符,但问题是在比较Calendar.Months时,其他检查工作正常
if (calendar.get(Calendar.DAY_OF_YEAR) > Calendar.getInstance().get(Calendar.DAY_OF_YEAR) && calendar.get(Calendar.YEAR) > Calendar.getInstance().get(Calendar.YEAR) ||
(calendar.get(Calendar.DAY_OF_YEAR) < Calendar.getInstance().get(Calendar.DAY_OF_YEAR) && calendar.get(Calendar.YEAR) > Calendar.getInstance().get(Calendar.YEAR)) ||
(calendar.get(Calendar.DAY_OF_YEAR) == Calendar.getInstance().get(Calendar.DAY_OF_YEAR) && calendar.get(Calendar.YEAR) > Calendar.getInstance().get(Calendar.YEAR))||
(calendar.get(Calendar.DAY_OF_YEAR) == Calendar.getInstance().get(Calendar.DAY_OF_YEAR) && calendar.get(Calendar.MONTH) > Calendar.getInstance().get(Calendar.MONTH)&&calendar.get(Calendar.YEAR) == Calendar.getInstance().get(Calendar.YEAR)))
{
newTask.setDateStatus(ModelSeparator.TYPE_FUTURE);
if (!adapter.containsSeparatorFuture) {
adapter.containsSeparatorFuture = true;
separator = new ModelSeparator(ModelSeparator.TYPE_FUTURE);
Toast.makeText(getActivity(),"Future",Toast.LENGTH_SHORT).show();
}