[m-rev.] for review: extend documentation of calendar/same_date/2
Julien Fischer
jfischer at opturion.com
Sat Mar 28 22:28:11 AEDT 2026
For review by anyone.
Extend the documentation of calendar.same_date/2.
library/calender.m:
In particular, add a reminder that the reuslt are only meaningful if the
two arguments are date_times in the same time zone.
Julien.
diff --git a/library/calendar.m b/library/calendar.m
index 05128b5d0..7d91e24e4 100644
--- a/library/calendar.m
+++ b/library/calendar.m
@@ -277,7 +277,10 @@
% same_date(A, B):
%
% Succeed if-and-only-if A and B refer to the exact same day.
- % Their time components are ignored.
+ % Their time components are ignored. A and B should refer to
+ % the same time zone; comparing dates in different time zones
+ % may give incorrect results because the same point in time can
+ % fall on different days in different time zones.
%
:- pred same_date(date_time::in, date_time::in) is semidet.
More information about the reviews
mailing list