回答編集履歴
2
1日ずれていた・・・
answer
CHANGED
@@ -29,7 +29,7 @@
|
|
29
29
|
}
|
30
30
|
|
31
31
|
static long dayOfYear(int y, int m, int d) {
|
32
|
-
return ChronoUnit.DAYS.between(LocalDate.of(y, 1, 1), LocalDate.of(y, m, d));
|
32
|
+
return ChronoUnit.DAYS.between(LocalDate.of(y, 1, 1).minusDays(1), LocalDate.of(y, m, d));
|
33
33
|
}
|
34
34
|
|
35
35
|
static long leftDayOfYear(int y, int m, int d) {
|
1
追記
answer
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
技術的な制約事項がなければ、[LocalDate](https://docs.oracle.com/javase/jp/8/docs/api/java/time/LocalDate.html)と[java.time.temporal.ChronoUnit](https://docs.oracle.com/javase/jp/8/docs/api/java/time/temporal/ChronoUnit.html)を使ってくださいな。
|
1
|
+
技術的な制約事項がなければ、[java.time.LocalDate](https://docs.oracle.com/javase/jp/8/docs/api/java/time/LocalDate.html)と[java.time.temporal.ChronoUnit](https://docs.oracle.com/javase/jp/8/docs/api/java/time/temporal/ChronoUnit.html)を使ってくださいな。
|
2
2
|
|
3
3
|
|
4
4
|
```Java
|