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

Method getFirstDay

src/main/java/com/nlf/calendar/SolarWeek.java:242–249  ·  view source on GitHub ↗

获取本周第一天的阳历日期(可能跨月) @return 本周第一天的阳历日期

()

Source from the content-addressed store, hash-verified

240 * @return 本周第一天的阳历日期
241 */
242 public Solar getFirstDay() {
243 Solar solar = Solar.fromYmd(year, month, day);
244 int prev = solar.getWeek() - start;
245 if (prev < 0) {
246 prev += 7;
247 }
248 return solar.next(-prev);
249 }
250
251 /**
252 * 获取本周第一天的阳历日期(仅限当月)

Callers 6

testMethod · 0.95
testFromMondayMethod · 0.95
testFromSundayMethod · 0.95
getWeeksMethod · 0.95
nextMethod · 0.95
getDaysMethod · 0.95

Calls 3

fromYmdMethod · 0.95
getWeekMethod · 0.95
nextMethod · 0.95

Tested by 3

testMethod · 0.76
testFromMondayMethod · 0.76
testFromSundayMethod · 0.76