MCPcopy Create free account
hub / github.com/afkT/DevUtils / getYear

Method getYear

lib/DevApp/src/main/java/dev/utils/common/DateUtils.java:443–446  ·  view source on GitHub ↗

获取年份 @param calendar Calendar @return 年份

(final Calendar calendar)

Source from the content-addressed store, hash-verified

441 * @return 年份
442 */
443 public static int getYear(final Calendar calendar) {
444 if (calendar != null) return calendar.get(Calendar.YEAR);
445 return -1;
446 }
447
448 // =
449

Callers 3

isYearMethod · 0.95
getYearMonthNumberMethod · 0.95
getMonthDayNumberMethod · 0.95

Calls 3

getCalendarMethod · 0.95
parseLongMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected