Skip to content

Commit

Permalink
remove qxsl.ruler.Program.Annual
Browse files Browse the repository at this point in the history
  • Loading branch information
JG1VPP committed Oct 19, 2024
1 parent af9c910 commit d202e61
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions src/main/java/qxsl/ruler/Program.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
*******************************************************************************/
package qxsl.ruler;

import java.time.DayOfWeek;
import java.time.LocalDate;
import java.time.Year;
import java.time.ZoneId;

import static java.time.temporal.TemporalAdjusters.dayOfWeekInMonth;

/**
* コンテストの日程はこのクラスを継承します。
*
Expand Down Expand Up @@ -210,46 +207,4 @@ public boolean finish(ZoneId zone) {
* @since 2022/07/17
*/
public abstract boolean conflict(Section[] entries);

/**
* 特定の月の特定の曜日に開催されるコンテストです。
*
*
* @author 無線部開発班
*
* @since 2023/01/21
*/
public static abstract class Annual extends Program {
private final int mon;
private final int nth;
private final DayOfWeek day;

/**
* 開催日時を指定します。
*
*
* @param mon 月
* @param nth 週
* @param day 曜
*/
public Annual(int mon, int nth, DayOfWeek day) {
this.mon = mon;
this.nth = nth;
this.day = day;
}

/**
* 指定された年のコンテストの開始日を計算します。
*
*
* @param year 開催年
*
* @return 開始日
*/
@Override
public final LocalDate getStartDay(int year) {
final var date = LocalDate.of(year, mon, 1);
return date.with(dayOfWeekInMonth(nth, day));
}
}
}

0 comments on commit d202e61

Please sign in to comment.