Did you know ... Search Documentation:
Pack swi_ssardina -- prolog/datetime_ssardina.pl
PublicShow source
 get_date_time(-DateTime) is det
Retrieves the current date and time as a date-time structure in the local timezone.
 get_date_time_tz(-DateTime, +Timezone) is det
Retrieves the current date and time as a date-time structure. If a timezone is specified, it adjusts the date-time accordingly.
 stamp_date_time(+Stamp, -DateTime) is det
Generalization of stamp-date_time/3 to default local timezone https://www.swi-prolog.org/pldoc/doc_for?object=stamp_date_time/3
 stamp_date_time_tz(+Stamp, -DateTime, +Timezone) is det
Converts a timestamp to a date-time structure, taking into account the specified timezone as IANA identifiers (e.g., "America/New_York").

If the timezone is not recognized, it falls back to using the default Offset timezone

 get_iso_timestamp(-Stamp) is det
get_iso_timestamp(-Stamp, +TimeZone) is det.

Retrieves the current timestamp as an ISO 8601 formatted string in the timezone. If no timezone is specified, it defaults to the local timezone. If TimeZone is none or none(TZ), it returns the ISO timestamp without timezone information.

uses format_time/3 - https://www.swi-prolog.org/pldoc/man?predicate=format_time/3

 weekday_number(+StartISO, -DayNo)
Given a timestamp string, determine the day of the week as a number (1=Monday, ..., 7=Sunday).

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 iso_timestamp_string_atom(Arg1, Arg2)
 get_iso_timestamp(Arg1, Arg2)