MCPcopy Create free account
hub / github.com/6tail/lunar-java / nextHour

Method nextHour

src/main/java/com/nlf/calendar/Solar.java:858–870  ·  view source on GitHub ↗

小时推移 @param hours 小时数 @return 阳历

(int hours)

Source from the content-addressed store, hash-verified

856 * @return 阳历
857 */
858 public Solar nextHour(int hours) {
859 int h = hour + hours;
860 int n = h < 0 ? -1 : 1;
861 int hour = Math.abs(h);
862 int days = hour / 24 * n;
863 hour = (hour % 24) * n;
864 if (hour < 0) {
865 hour += 24;
866 days--;
867 }
868 Solar solar = next(days);
869 return fromYmdHms(solar.getYear(), solar.getMonth(), solar.getDay(), hour, solar.getMinute(), solar.getSecond());
870 }
871
872 /**
873 * 获取薪资比例(感谢 https://gitee.com/smr1987)

Callers 2

fromBaZiMethod · 0.95
getStartSolarMethod · 0.95

Calls 7

nextMethod · 0.95
fromYmdHmsMethod · 0.95
getYearMethod · 0.95
getMonthMethod · 0.95
getDayMethod · 0.95
getMinuteMethod · 0.95
getSecondMethod · 0.95

Tested by

no test coverage detected