本文整理了Java中org.apache.poi.ss.formula.atp.YearFracCalculator.isLeapYear()
方法的一些代码示例,展示了YearFracCalculator.isLeapYear()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YearFracCalculator.isLeapYear()
方法的具体详情如下:
包路径:org.apache.poi.ss.formula.atp.YearFracCalculator
类名称:YearFracCalculator
方法名:isLeapYear
暂无
代码示例来源:origin: org.apache.poi/poi
private static double averageYearLength(int startYear, int endYear) {
int dayCount = 0;
for (int i=startYear; i<=endYear; i++) {
dayCount += DAYS_PER_NORMAL_YEAR;
if (isLeapYear(i)) {
dayCount++;
}
}
double numberOfYears = endYear-startYear+1;
return dayCount / numberOfYears;
}
代码示例来源:origin: org.apache.poi/poi
private static int getLastDayOfMonth(SimpleDate date) {
switch (date.month) {
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
return LONG_MONTH_LEN;
case 4:
case 6:
case 9:
case 11:
return SHORT_MONTH_LEN;
}
if (isLeapYear(date.year)) {
return LONG_FEB_LEN;
}
return SHORT_FEB_LEN;
}
代码示例来源:origin: org.apache.poi/poi
if (isLeapYear(start.year)) {
if (start.year == end.year) {
if (isLeapYear(end.year)) {
switch (end.month) {
case SimpleDate.JANUARY:
代码示例来源:origin: com.haulmont.thirdparty/poi
private static double averageYearLength(int startYear, int endYear) {
int dayCount = 0;
for (int i=startYear; i<=endYear; i++) {
dayCount += DAYS_PER_NORMAL_YEAR;
if (isLeapYear(i)) {
dayCount++;
}
}
double numberOfYears = endYear-startYear+1;
return dayCount / numberOfYears;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
private static double averageYearLength(int startYear, int endYear) {
int dayCount = 0;
for (int i=startYear; i<=endYear; i++) {
dayCount += DAYS_PER_NORMAL_YEAR;
if (isLeapYear(i)) {
dayCount++;
}
}
double numberOfYears = endYear-startYear+1;
return dayCount / numberOfYears;
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
private static double averageYearLength(int startYear, int endYear) {
int dayCount = 0;
for (int i=startYear; i<=endYear; i++) {
dayCount += DAYS_PER_NORMAL_YEAR;
if (isLeapYear(i)) {
dayCount++;
}
}
double numberOfYears = endYear-startYear+1;
return dayCount / numberOfYears;
}
代码示例来源:origin: com.haulmont.thirdparty/poi
private static int getLastDayOfMonth(SimpleDate date) {
switch (date.month) {
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
return LONG_MONTH_LEN;
case 4:
case 6:
case 9:
case 11:
return SHORT_MONTH_LEN;
}
if (isLeapYear(date.year)) {
return LONG_FEB_LEN;
}
return SHORT_FEB_LEN;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
private static int getLastDayOfMonth(SimpleDate date) {
switch (date.month) {
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
return LONG_MONTH_LEN;
case 4:
case 6:
case 9:
case 11:
return SHORT_MONTH_LEN;
}
if (isLeapYear(date.year)) {
return LONG_FEB_LEN;
}
return SHORT_FEB_LEN;
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
private static int getLastDayOfMonth(SimpleDate date) {
switch (date.month) {
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
return LONG_MONTH_LEN;
case 4:
case 6:
case 9:
case 11:
return SHORT_MONTH_LEN;
}
if (isLeapYear(date.year)) {
return LONG_FEB_LEN;
}
return SHORT_FEB_LEN;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
if (isLeapYear(start.year)) {
if (start.year == end.year) {
if (isLeapYear(end.year)) {
switch (end.month) {
case SimpleDate.JANUARY:
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
boolean startIsLeapYear = isLeapYear(start.year);
if (startIsLeapYear && start.year == end.year) {
boolean endIsLeapYear = isLeapYear(end.year);
if (!startIsLeapYear && !endIsLeapYear) {
return false;
代码示例来源:origin: com.haulmont.thirdparty/poi
boolean startIsLeapYear = isLeapYear(start.year);
if (startIsLeapYear && start.year == end.year) {
boolean endIsLeapYear = isLeapYear(end.year);
if (!startIsLeapYear && !endIsLeapYear) {
return false;
内容来源于网络,如有侵权,请联系作者删除!