org.threeten.bp.LocalDate.lengthOfMonth()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中org.threeten.bp.LocalDate.lengthOfMonth()方法的一些代码示例,展示了LocalDate.lengthOfMonth()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LocalDate.lengthOfMonth()方法的具体详情如下:
包路径:org.threeten.bp.LocalDate
类名称:LocalDate
方法名:lengthOfMonth

LocalDate.lengthOfMonth介绍

[英]Returns the length of the month represented by this date.

This returns the length of the month in days. For example, a date in January would return 31.
[中]返回此日期表示的月份长度。
这将返回月份的长度(以天为单位)。例如,1月份的日期将返回31。

代码示例

代码示例来源:origin: prolificinteractive/material-calendarview

private int getWeekCountBasedOnMode() {
 int weekCount = calendarMode.visibleWeeksCount;
 final boolean isInMonthsMode = calendarMode.equals(CalendarMode.MONTHS);
 if (isInMonthsMode && mDynamicHeightEnabled && adapter != null && pager != null) {
  final LocalDate cal = adapter.getItem(pager.getCurrentItem()).getDate();
  final LocalDate tempLastDay = cal.withDayOfMonth(cal.lengthOfMonth());
  weekCount = tempLastDay.get(WeekFields.of(firstDayOfWeek, 1).weekOfMonth());
 }
 return showWeekDays ? weekCount + DAY_NAMES_ROW : weekCount;
}

代码示例来源:origin: ThreeTen/threetenbp

@Override
public int lengthOfMonth() {
  return isoDate.lengthOfMonth();
}

代码示例来源:origin: ThreeTen/threetenbp

@Override
public int lengthOfMonth() {
  return isoDate.lengthOfMonth();
}

代码示例来源:origin: org.threeten/threetenbp

@Override
public int lengthOfMonth() {
  return isoDate.lengthOfMonth();
}

代码示例来源:origin: org.threeten/threetenbp

@Override
public int lengthOfMonth() {
  return isoDate.lengthOfMonth();
}

代码示例来源:origin: org.threeten/threetenbp

@Override
public int lengthOfMonth() {
  return isoDate.lengthOfMonth();
}

代码示例来源:origin: ThreeTen/threetenbp

@Override
public int lengthOfMonth() {
  return isoDate.lengthOfMonth();
}

代码示例来源:origin: shrikanth7698/Collapsible-Calendar-View-Android

int lastDayOfMonth = mCal.lengthOfMonth();
DayOfWeek firstDayOfWeek = mCal.getDayOfWeek();
    numDay = tempCal.lengthOfMonth() + i;
  } else if (i > lastDayOfMonth) { // next month
    if (month == DECEMBER.getValue()) {

代码示例来源:origin: ThreeTen/threetenbp

} else if (totalMonths < 0 && days > 0) {
  totalMonths++;
  days -= end.lengthOfMonth();

代码示例来源:origin: org.threeten/threetenbp

} else if (totalMonths < 0 && days > 0) {
  totalMonths++;
  days -= end.lengthOfMonth();

代码示例来源:origin: ThreeTen/threetenbp

if (f.isDateBased()) {
  switch (f) {
    case DAY_OF_MONTH: return ValueRange.of(1, lengthOfMonth());
    case DAY_OF_YEAR: return ValueRange.of(1, lengthOfYear());
    case ALIGNED_WEEK_OF_MONTH: return ValueRange.of(1, getMonth() == Month.FEBRUARY && isLeapYear() == false ? 4 : 5);

代码示例来源:origin: org.threeten/threetenbp

if (f.isDateBased()) {
  switch (f) {
    case DAY_OF_MONTH: return ValueRange.of(1, lengthOfMonth());
    case DAY_OF_YEAR: return ValueRange.of(1, lengthOfYear());
    case ALIGNED_WEEK_OF_MONTH: return ValueRange.of(1, getMonth() == Month.FEBRUARY && isLeapYear() == false ? 4 : 5);

相关文章