protocol
datep
Date protocol.
logtalk_load(dates(loader))staticPublic predicates
today/3
Returns current date.
statictoday(Year,Month,Day)today(-integer,-integer,-integer) - oneleap_year/1
True if the argument is a leap year.
staticleap_year(Year)leap_year(+integer) - zero_or_onename_of_day/3
Name and short name of day.
staticname_of_day(Index,Name,Short)name_of_day(?integer,?atom,?atom) - zero_or_morename_of_month/3
Name and short name of month.
staticname_of_month(Index,Name,Short)name_of_month(?integer,?atom,?atom) - zero_or_moredays_in_month/3
Number of days in a month.
staticdays_in_month(Month,Year,Days)days_in_month(?integer,+integer,?integer) - zero_or_morevalid/3
True if the arguments represent a valid date.
staticvalid(Year,Month,Day)valid(@integer,@integer,@integer) - zero_or_onedate_time_to_unix/2
Converts a UTC date-time term date_time(Year,Month,Day,Hours,Minutes,Seconds) to Unix epoch seconds.
staticdate_time_to_unix(DateTime,UnixTime)date_time_to_unix(+compound,-integer) - zero_or_oneunix_to_date_time/2
Converts Unix epoch seconds to a UTC date-time term date_time(Year,Month,Day,Hours,Minutes,Seconds).
staticunix_to_date_time(UnixTime,DateTime)unix_to_date_time(+integer,-compound) - oneadd_duration/3
Adds a duration to a datetime. Duration can be integer seconds or duration(Days,Hours,Minutes,Seconds).
staticadd_duration(DateTime,Duration,ResultDateTime)add_duration(+compound,+nonvar,-compound) - zero_or_onesubtract_duration/3
Subtracts a duration from a datetime. Duration can be integer seconds or duration(Days,Hours,Minutes,Seconds).
staticsubtract_duration(DateTime,Duration,ResultDateTime)subtract_duration(+compound,+nonvar,-compound) - zero_or_oneduration_between/3
Computes the difference between two datetimes as integer seconds or as duration(Days,Hours,Minutes,Seconds).
staticduration_between(StartDateTime,EndDateTime,Duration)duration_between(+compound,+compound,?term) - zero_or_oneutc_to_local/3
Converts a UTC datetime to a local datetime using an explicit timezone offset atom (Z or ±HH:MM).
staticutc_to_local(UTCDateTime,Offset,LocalDateTime)utc_to_local(+compound,+atom,-compound) - zero_or_onelocal_to_utc/3
Converts a local datetime to UTC using an explicit timezone offset atom (Z or ±HH:MM).
staticlocal_to_utc(LocalDateTime,Offset,UTCDateTime)local_to_utc(+compound,+atom,-compound) - zero_or_oneday_of_year/2
Computes the day of year (1-366) for a date(Year,Month,Day) or date_time(...) term.
staticday_of_year(DateLike,DayOfYear)day_of_year(+compound,?integer) - zero_or_oneweek_of_year_iso/2
Computes ISO week for a date(Year,Month,Day) or date_time(...) term as week(Week,Year).
staticweek_of_year_iso(DateLike,ISOWeek)week_of_year_iso(+compound,?compound) - zero_or_oneweekday/2
Computes ISO weekday number (Monday=1, …, Sunday=7) for a date(Year,Month,Day) or date_time(...) term.
staticweekday(DateLike,Weekday)weekday(+compound,?integer) - zero_or_onenormalize_date_time/2
Normalizes a datetime term by carrying overflows/underflows in date and time fields.
staticnormalize_date_time(DateTime,NormalizedDateTime)normalize_date_time(+compound,-compound) - onevalid_date_time/1
True iff a datetime term is valid in strict mode.
staticvalid_date_time(DateTime)valid_date_time(@compound) - zero_or_onevalid_date_time/2
Validates a datetime term in strict or relaxed mode.
staticvalid_date_time(DateTime,Mode)valid_date_time(@compound,+atom) - zero_or_oneProtected predicates
(none)
Private predicates
(none)
Operators
(none)