Home
last modified time | relevance | path

Searched refs:year (Results 1 – 25 of 57) sorted by relevance

123

/frameworks/opt/datetimepicker/src/com/android/datetimepicker/date/
DMonthAdapter.java53 int year; field in MonthAdapter.CalendarDay
66 year = calendar.get(Calendar.YEAR); in CalendarDay()
71 public CalendarDay(int year, int month, int day) { in CalendarDay() argument
72 setDay(year, month, day); in CalendarDay()
76 year = date.year; in set()
81 public void setDay(int year, int month, int day) { in setDay() argument
82 this.year = year; in setDay()
101 year = calendar.get(Calendar.YEAR); in setTime()
106 return year; in getYear()
192 final int year = position / MONTHS_IN_YEAR + mController.getMinYear(); in getView() local
[all …]
DYearPickerView.java73 for (int year = mController.getMinYear(); year <= mController.getMaxYear(); year++) { in init()
74 years.add(String.format("%d", year)); in init()
114 int year = getYearFromTextView(v); in getView() local
115 boolean selected = mController.getSelectedDay().year == year; in getView()
150 postSetSelectionCentered(mController.getSelectedDay().year - mController.getMinYear()); in onDateChanged()
DDatePickerDialog.java125 void onDateSet(DatePickerDialog dialog, int year, int monthOfYear, int dayOfMonth); in onDateSet() argument
147 public static DatePickerDialog newInstance(OnDateSetListener callBack, int year, in newInstance() argument
151 ret.initialize(callBack, year, monthOfYear, dayOfMonth); in newInstance()
155 public void initialize(OnDateSetListener callBack, int year, int monthOfYear, int dayOfMonth) { in initialize() argument
157 mCalendar.set(Calendar.YEAR, year); in initialize()
431 private void adjustDayInMonthIfNeeded(int month, int year) { in adjustDayInMonthIfNeeded() argument
433 int daysInMonth = Utils.getDaysInMonth(month, year); in adjustDayInMonthIfNeeded()
450 public void onYearSelected(int year) { in onYearSelected() argument
451 adjustDayInMonthIfNeeded(mCalendar.get(Calendar.MONTH), year); in onYearSelected() local
452 mCalendar.set(Calendar.YEAR, year); in onYearSelected()
[all …]
DMonthView.java409 return mYear == today.year && in sameDay()
517 public abstract void drawMonthDay(Canvas canvas, int year, int month, int day, in drawMonthDay() argument
590 protected boolean isOutOfRange(int year, int month, int day) { in isOutOfRange() argument
591 if (isBeforeMin(year, month, day)) { in isOutOfRange()
593 } else if (isAfterMax(year, month, day)) { in isOutOfRange()
600 private boolean isBeforeMin(int year, int month, int day) { in isBeforeMin() argument
609 if (year < minDate.get(Calendar.YEAR)) { in isBeforeMin()
611 } else if (year > minDate.get(Calendar.YEAR)) { in isBeforeMin()
628 private boolean isAfterMax(int year, int month, int day) { in isAfterMax() argument
637 if (year > maxDate.get(Calendar.YEAR)) { in isAfterMax()
[all …]
DDatePickerController.java29 void onYearSelected(int year); in onYearSelected() argument
31 void onDayOfMonthSelected(int year, int month, int day); in onDayOfMonthSelected() argument
DSimpleMonthView.java31 public void drawMonthDay(Canvas canvas, int year, int month, int day, in drawMonthDay() argument
39 if (isOutOfRange(year, month, day)) { in drawMonthDay()
DDayPickerView.java186 final int position = (day.year - mController.getMinYear()) in goTo()
442 cal.set(day.year, day.month, day.day); in getMonthAndYearString()
476 int year = firstVisiblePosition / 12 + mController.getMinYear(); in performAccessibilityAction() local
477 CalendarDay day = new CalendarDay(year, month, 1); in performAccessibilityAction()
484 day.year++; in performAccessibilityAction()
496 day.year--; in performAccessibilityAction()
/frameworks/base/core/java/android/widget/
DYearPickerView.java62 final int year = mAdapter.getYearForPosition(position); in YearPickerView()
63 mAdapter.setSelection(year); in YearPickerView()
66 mOnYearSelectedListener.onYearChanged(YearPickerView.this, year); in YearPickerView()
84 public void setYear(final int year) { in setYear() argument
85 mAdapter.setSelection(year); in setYear()
90 final int position = mAdapter.getPositionForYear(year); in setYear()
135 public boolean setSelection(int year) { in setSelection() argument
136 if (mActivatedYear != year) { in setSelection()
137 mActivatedYear = year; in setSelection()
159 public int getPositionForYear(int year) { in getPositionForYear() argument
[all …]
DDatePickerCalendarDelegate.java248 public void onYearChanged(YearPickerView view, int year) {
256 final int daysInMonth = getDaysInMonth(month, year);
261 mCurrentDate.set(Calendar.YEAR, year);
313 final String year = mYearFormat.format(mCurrentDate.getTime()); in onCurrentDateChanged() local
314 mHeaderYear.setText(year); in onCurrentDateChanged()
340 final int year = mCurrentDate.get(Calendar.YEAR); in setCurrentView() local
341 mYearPickerView.setYear(year); in setCurrentView()
363 public void init(int year, int month, int dayOfMonth, in init() argument
365 setDate(year, month, dayOfMonth); in init()
372 public void updateDate(int year, int month, int dayOfMonth) { in updateDate() argument
[all …]
DDatePicker.java133 void onDateChanged(DatePicker view, int year, int monthOfYear, int dayOfMonth); in onDateChanged() argument
226 public void init(int year, int monthOfYear, int dayOfMonth, in init() argument
228 mDelegate.init(year, monthOfYear, dayOfMonth, onDateChangedListener); in init()
248 public void updateDate(int year, int month, int dayOfMonth) { in updateDate() argument
249 mDelegate.updateDate(year, month, dayOfMonth); in updateDate()
520 void init(int year, int monthOfYear, int dayOfMonth, in init() argument
526 void updateDate(int year, int month, int dayOfMonth); in updateDate() argument
690 public SavedState(Parcelable superState, int year, int month, int day, long minDate, in SavedState() argument
692 this(superState, year, month, day, minDate, maxDate, 0, 0, 0); in SavedState()
698 public SavedState(Parcelable superState, int year, int month, int day, long minDate, in SavedState() argument
[all …]
DDatePickerSpinnerDelegate.java162 public void onSelectedDayChange(CalendarView view, int year, int month, int monthDay) { in DatePickerSpinnerDelegate()
163 setDate(year, month, monthDay); in DatePickerSpinnerDelegate()
186 mYearSpinner = (NumberPicker) mDelegator.findViewById(com.android.internal.R.id.year); in DatePickerSpinnerDelegate()
240 public void init(int year, int monthOfYear, int dayOfMonth, in init() argument
242 setDate(year, monthOfYear, dayOfMonth); in init()
250 public void updateDate(int year, int month, int dayOfMonth) { in updateDate() argument
251 if (!isNewDate(year, month, dayOfMonth)) { in updateDate()
254 setDate(year, month, dayOfMonth); in updateDate()
499 private boolean isNewDate(int year, int month, int dayOfMonth) { in isNewDate() argument
500 return (mCurrentDate.get(Calendar.YEAR) != year in isNewDate()
[all …]
/frameworks/base/core/java/com/android/internal/http/
DHttpDateTime.java90 int year = 1970; in parse() local
97 year = getYear(rfcMatcher.group(3)); in parse()
105 year = getYear(ansicMatcher.group(4)); in parse()
112 if (year >= 2038) { in parse()
113 year = 2038; in parse()
120 month, year); in parse()
183 int year = (yearString.charAt(0) - '0') * 10 in getYear() local
185 if (year >= 70) { in getYear()
186 return year + 1900; in getYear()
188 return year + 2000; in getYear()
[all …]
/frameworks/ex/common/java/com/android/common/
DLegacyHttpDateTime.java90 int year = 1970; in parse() local
97 year = getYear(rfcMatcher.group(3)); in parse()
105 year = getYear(ansicMatcher.group(4)); in parse()
112 if (year >= 2038) { in parse()
113 year = 2038; in parse()
120 month, year); in parse()
183 int year = (yearString.charAt(0) - '0') * 10 in getYear() local
185 if (year >= 70) { in getYear()
186 return year + 1900; in getYear()
188 return year + 2000; in getYear()
[all …]
/frameworks/base/core/java/android/app/
DDatePickerDialog.java89 int year, int month, int dayOfMonth) { in DatePickerDialog() argument
90 this(context, 0, listener, null, year, month, dayOfMonth); in DatePickerDialog()
108 @Nullable OnDateSetListener listener, int year, int monthOfYear, int dayOfMonth) { in DatePickerDialog() argument
109 this(context, themeResId, listener, null, year, monthOfYear, dayOfMonth); in DatePickerDialog()
113 @Nullable OnDateSetListener listener, @Nullable Calendar calendar, int year, in DatePickerDialog() argument
127 year = calendar.get(Calendar.YEAR); in DatePickerDialog()
133 mDatePicker.init(year, monthOfYear, dayOfMonth, this); in DatePickerDialog()
150 public void onDateChanged(@NonNull DatePicker view, int year, int month, int dayOfMonth) { in onDateChanged() argument
151 mDatePicker.init(year, month, dayOfMonth, this); in onDateChanged()
199 public void updateDate(int year, int month, int dayOfMonth) { in updateDate() argument
[all …]
/frameworks/opt/calendar/src/com/android/calendarcommon2/
DRecurrenceProcessor.java432 int realYear = iterator.year; in get()
441 + "/" + iterator.year + " day=" + day); in get()
448 realYear = t.year; in get()
454 + "/" + t.year); in get()
471 + "/" + t.year in get()
879 int iteratorYear = iterator.year; in expand()
889 if (SPEW) Log.i(TAG, "year=" + generated.year); in expand()
1090 iterator.year += value; in expand()
1144 int year = date.year; in unsafeNormalize() local
1167 int days = month > 1 ? yearLength(year) : yearLength(year - 1); in unsafeNormalize()
[all …]
/frameworks/data-binding/extensions/baseAdapters/src/main/java/android/databinding/adapters/
DDatePickerBindingAdapter.java35 public static void setListeners(DatePicker view, int year, int month, int day, in setListeners() argument
38 if (year == 0) { in setListeners()
39 year = view.getYear(); in setListeners()
45 view.init(year, month, day, listener); in setListeners()
53 view.init(year, month, day, oldListener); in setListeners()
72 public void onDateChanged(DatePicker view, int year, int monthOfYear, int dayOfMonth) { in onDateChanged() argument
74 mListener.onDateChanged(view, year, monthOfYear, dayOfMonth); in onDateChanged()
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DDatePicker.java83 void onDateChanged(DatePicker view, int year, int monthOfYear, int dayOfMonth); in onDateChanged() argument
149 mYearPicker = findViewById(R.id.year); in DatePicker()
271 public void updateDate(int year, int monthOfYear, int dayOfMonth) { in updateDate() argument
272 if (mYear != year || mMonth != monthOfYear || mDay != dayOfMonth) { in updateDate()
273 mYear = (mYearOptional && year == 0) ? getCurrentYear() : year; in updateDate()
297 private SavedState(Parcelable superState, int year, int month, int day, boolean hasYear, in SavedState() argument
300 mYear = year; in SavedState()
398 public void init(int year, int monthOfYear, int dayOfMonth, in init() argument
400 init(year, monthOfYear, dayOfMonth, false, onDateChangedListener); in init()
411 public void init(int year, int monthOfYear, int dayOfMonth, boolean yearOptional, in init() argument
[all …]
/frameworks/base/core/java/android/text/format/
DTime.java109 public int year; field in Time
201 this.year = 1970; in initialize()
273 int y = this.year; in getActualMaximum()
284 int y = this.year; in getActualMaximum()
311 this.year = 0; in clear()
436 year = n; in parseInternal()
565 year = n; in parse3339Internal()
792 this.year = that.year; in set()
803 public void set(int second, int minute, int hour, int monthDay, int month, int year) { in set() argument
810 this.year = year; in set()
[all …]
DTimeFormatter.java293 int year = wallTime.getYear(); in handleToken() local
298 int len = isLeap(year) ? DAYSPERLYEAR : DAYSPERNYEAR; in handleToken()
308 ++year; in handleToken()
316 --year; in handleToken()
317 yday += isLeap(year) ? DAYSPERLYEAR : DAYSPERNYEAR; in handleToken()
322 outputYear(year, false, true, modifier); in handleToken()
324 outputYear(year, true, true, modifier); in handleToken()
459 private static boolean isLeap(int year) { in isLeap() argument
460 return (((year) % 4) == 0 && (((year) % 100) != 0 || ((year) % 400) == 0)); in isLeap()
/frameworks/base/core/tests/coretests/src/android/text/format/
DTimeTest.java197 if (local.year != test.year2 || local.month != test.month2 in testNormalize1()
203 local.year, local.month, local.monthDay, local.hour, local.minute); in testNormalize1()
215 if (local.year != test.year2 || local.month != test.month2 in testNormalize1()
221 local.year, local.month, local.monthDay, local.hour, local.minute); in testNormalize1()
238 if (local.year != test.year2 || local.month != test.month2 in testNormalize1()
245 local.year, local.month, local.monthDay, local.hour, local.minute, in testNormalize1()
260 if (local.year != test.year2 || local.month != test.month2 in testNormalize1()
267 local.year, local.month, local.monthDay, local.hour, local.minute, in testNormalize1()
369 if (!t.allDay || t.year != 1980 || t.month != 04 || t.monthDay != 23) { in testParse33390()
374 if (t.allDay || t.year != 1980 || t.month != 04 || t.monthDay != 23 || in testParse33390()
[all …]
/frameworks/base/core/java/android/util/
DMonthDisplayHelper.java46 public MonthDisplayHelper(int year, int month, int weekStartDay) { in MonthDisplayHelper() argument
54 mCalendar.set(Calendar.YEAR, year); in MonthDisplayHelper()
66 public MonthDisplayHelper(int year, int month) { in MonthDisplayHelper() argument
67 this(year, month, Calendar.SUNDAY); in MonthDisplayHelper()
/frameworks/av/media/mtp/
DMtpUtils.cpp37 int year, month, day, hour, minute, second; in parseDateTime() local
39 &year, &month, &day, &hour, &minute, &second) != 6) in parseDateTime()
64 tm.tm_year = year - 1900; in parseDateTime()
/frameworks/base/core/tests/coretests/src/android/widget/
DDatePickerFocusTest.java124 View year = mDatePicker. in testYearChoice()
126 assertTrue(year.requestFocus()); in testYearChoice()
146 View year = mDatePicker. in testYearChoice()
148 assertTrue(year.hasFocus()); in testYearChoice()
229 private void assertDateIs(int month, final int day, final int year) throws Throwable { in assertDateIs() argument
235 assertEquals(year, mDatePicker.getYear()); in assertDateIs()
/frameworks/base/telephony/java/com/android/internal/telephony/
DSmsCbEtwsInfo.java150 int year = IccUtils.gsmBcdByteToInt(mWarningSecurityInformation[0]); in getPrimaryNotificationTimestamp() local
172 time.year = year + 2000; in getPrimaryNotificationTimestamp()
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/picker/
DDatePicker.java393 private void setDate(int year, int month, int dayOfMonth) { in setDate() argument
394 mCurrentDate.set(year, month, dayOfMonth); in setDate()
410 public void updateDate(int year, int month, int dayOfMonth, boolean animation) { in updateDate() argument
411 if (!isNewDate(year, month, dayOfMonth)) { in updateDate()
414 setDate(year, month, dayOfMonth); in updateDate()
418 private boolean isNewDate(int year, int month, int dayOfMonth) { in isNewDate() argument
419 return (mCurrentDate.get(Calendar.YEAR) != year in isNewDate()

123