mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-04 18:23:15 +02:00
fix: correct less or equal syntax
This commit is contained in:
parent
1d45a8dd4d
commit
11b189877d
@ -25,7 +25,7 @@ day_of_year(Date, DayOfYear) :-
|
||||
atom_chars(Month, MonthChars),
|
||||
month_days(Month, DaysInMonth, MonthDays),
|
||||
atom_number(Day, DayNumber),
|
||||
((DayNumber <= DaysInMonth, DayNumber > 0) -> DayOfYear is MonthDays + DayNumber) ; fail.
|
||||
((DayNumber =< DaysInMonth, DayNumber > 0) -> DayOfYear is MonthDays + DayNumber) ; fail.
|
||||
|
||||
% interval(Date1, Date2) prints the number of days between Date1 and Date2
|
||||
% We always expect date to be in format ddmm where 'd' stands for day and 'm' stands for month
|
||||
|
||||
Loading…
Reference in New Issue
Block a user