Attempts to restore accessibility focus to the specified date.

@param day The date which should receive focus
@return {@code false} if the date is not valid for this month view, or
{@code true} if the date received focus
18629
public boolean restoreAccessibilityFocus(CalendarDay day) {
        if ((day.year != mYear) || (day.month != mMonth) || (day.day > mNumCells)) {
            return false;
        }

        mNodeProvider.setFocusedItem(day);
        return true;
    }
410649
function () {

         var oCalendarTBody = Dom.get(calendarId).tBodies[0],
            aElements = oCalendarTBody.getElementsByTagName("a"),
            oAnchor;

         if (aElements.length > 0) {
         
            Dom.batch(aElements, function (element) {
               if (Dom.hasClass(element.parentNode, "today")) {
                  oAnchor = element;
               }
            });
            
            if (!oAnchor) {
               oAnchor = aElements[0];
            }

            // Focus the anchor element using a timer since Calendar will try 
            // to set focus to its next button by default
            
            lang.later(0, oAnchor, function () {
               try {
                  oAnchor.focus();
               }
               catch(e) {}
            });
         
         }
         
      }
1137747
public boolean isWorkingDate(Date date)
   {
      Calendar cal = DateHelper.popCalendar(date);
      Day day = Day.getInstance(cal.get(Calendar.DAY_OF_WEEK));
      DateHelper.pushCalendar(cal);
      return isWorkingDate(date, day);
   }
606158
public void setWeeklyDay(Day day, boolean value)
   {
      if (value)
      {
         m_days.add(day);
      }
      else
      {
         m_days.remove(day);
      }
   }
856667
public boolean checkDate(Date date) {
		Calendar calendar = Calendar.getInstance();
		calendar.setTime(date);
		calendar.set(Calendar.HOUR_OF_DAY, 0);
		calendar.set(Calendar.MINUTE, 0);
		calendar.set(Calendar.SECOND, 0);
		calendar.set(Calendar.MILLISECOND, 0);

		Calendar minCal = Calendar.getInstance();
		minCal.setTime(minSelectableDate);
		minCal.set(Calendar.HOUR_OF_DAY, 0);
		minCal.set(Calendar.MINUTE, 0);
		minCal.set(Calendar.SECOND, 0);
		minCal.set(Calendar.MILLISECOND, 0);

		Calendar maxCal = Calendar.getInstance();
		maxCal.setTime(maxSelectableDate);
		maxCal.set(Calendar.HOUR_OF_DAY, 0);
		maxCal.set(Calendar.MINUTE, 0);
		maxCal.set(Calendar.SECOND, 0);
		maxCal.set(Calendar.MILLISECOND, 0);

		return !(calendar.before(minCal) || calendar.after(maxCal));
	}
241865
public void setDateSelected(CalendarDay day, boolean selected) {
    if (selected) {
      if (!selectedDates.contains(day)) {
        selectedDates.add(day);
        invalidateSelectedDates();
      }
    } else {
      if (selectedDates.contains(day)) {
        selectedDates.remove(day);
        invalidateSelectedDates();
      }
    }
  }
1030731
public void setDay(int v) {
    if (Date_Type.featOkTst && ((Date_Type)jcasType).casFeat_day == null)
      jcasType.jcas.throwFeatMissing("day", "de.julielab.jules.types.Date");
    jcasType.ll_cas.ll_setIntValue(addr, ((Date_Type)jcasType).casFeatCode_day, v);}
1165506
private String getStringForDay(int day) {
        if(fDates == null) {
            loadDates();
        }
        for(URelativeString dayItem : fDates) {
            if(dayItem.offset == day) {
                return dayItem.string;
            }
        }
        return null;
    }
677526
private static int dayToUtilDay(int day) {
        switch (day) {
            case EventRecurrence.SU: return Calendar.SUNDAY;
            case EventRecurrence.MO: return Calendar.MONDAY;
            case EventRecurrence.TU: return Calendar.TUESDAY;
            case EventRecurrence.WE: return Calendar.WEDNESDAY;
            case EventRecurrence.TH: return Calendar.THURSDAY;
            case EventRecurrence.FR: return Calendar.FRIDAY;
            case EventRecurrence.SA: return Calendar.SATURDAY;
            default: throw new IllegalArgumentException("bad day argument: " + day);
        }
    }
253042
private static Date getDate(int day, int month, int year) {
		Calendar cal = Calendar.getInstance();
		cal.set(Calendar.YEAR, year);
		cal.set(Calendar.MONTH, month);
		cal.set(Calendar.DATE, day);
		return cal.getTime();
	}
1280000
function dayOffsetToDate(dayOffset) {
		var date = cloneDate(t.visStart);
		addDays(date, dayOffset);
		return date;
	}
1240774
public static int getDayAsReadableInt(Calendar calendar) {
        int day = calendar.get(Calendar.DAY_OF_MONTH);
        int month = calendar.get(Calendar.MONTH) + 1;
        int year = calendar.get(Calendar.YEAR);
        return year * 10000 + month * 100 + day;
    }
433905
public boolean contains(Date date)
   {
      boolean result = false;

      if (date != null)
      {
         result = (DateHelper.compare(getFromDate(), getToDate(), date) == 0);
      }

      return (result);
   }
239030
public static boolean validate(final String date) {

        Matcher matcher = PATTERN.matcher(date);

        if (matcher.matches()) {

            matcher.reset();

            if (matcher.find()) {

                int year = Integer.parseInt(matcher.group(1));
                String month = matcher.group(2);
                String day = matcher.group(3);

                if (day.equals("31") && (month.equals("4") || month.equals("6") || month.equals("9") || month
                        .equals("11") || month.equals("04") || month.equals("06") || month.equals("09"))) {
                    return false; // only 1,3,5,7,8,10,12 has 31 days
                } else if (month.equals("2") || month.equals("02")) {
                    // leap year
                    if (year % 4 == 0) {
                        return !(day.equals("30") || day.equals("31"));
                    } else {
                        return !(day.equals("29") || day.equals("30") || day.equals("31"));
                    }
                } else {
                    return true;
                }
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
1221165
public boolean inGivenDay(Date theGivenDate) {
		Date[] givenDay = of(theGivenDate).asDayRange();
		return this.target.compareTo(givenDay[0]) >= 0 && this.target.compareTo(givenDay[1]) <= 0;
	}
989116
private static boolean checkDate(Calendar cal, int date, int month) {
		return cal.get(Calendar.DATE) == date && cal.get(Calendar.MONTH) == month;
	}
457616
public boolean inThisDay(Date theTargetDate) {
		Date[] thisDay = asDayRange();
		return theTargetDate.compareTo(thisDay[0]) >= 0 && theTargetDate.compareTo(thisDay[1]) <= 0;
	}