aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-175/adam-russell/fortran/ch-1.f6
1 files changed, 4 insertions, 2 deletions
diff --git a/challenge-175/adam-russell/fortran/ch-1.f b/challenge-175/adam-russell/fortran/ch-1.f
index d7148a4ab6..637cfe8983 100644
--- a/challenge-175/adam-russell/fortran/ch-1.f
+++ b/challenge-175/adam-russell/fortran/ch-1.f
@@ -1,11 +1,13 @@
program last_sunday
-use datetime_module, only: datetime, timedelta, clock
+use datetime_module, only: datetime
implicit none
character(10), dimension(12) :: last_sundays
integer :: month
do month = 1, 12
last_sundays(month) = last_sunday_month(month, 2022)
+end do
+do month = 1, 12
write(*, *) last_sundays(month)
end do
@@ -18,7 +20,7 @@ contains
type(datetime) :: date
do day = 20, 31
date = datetime(year, month, day)
- if (date % isValid() .and. date % weekday() == 0) then
+ if (date%isValid() .and. date%weekday() == 0) then
write(sunday, '(i4,a1,i0.2,a1,i2)') year, '-', month, '-', day
end if
end do