This built-in predicate unifies the current system date with the parameters. The current system date will not be changed, use put_date/3 to change the system date.
see also: get_cpu_time/1 put_date/3 put_time/4 time/4 time_elapsed/1
| Examples | |
| date(2000, 10, 16). | this predicate fails if the current system date is not 16 October 2000, else it succeeds |
| date(A, B, C). | succeeds and if the current system date is 16
October 2000 then values of the variables after unification is: A = 2000 B = 10 C = 16 |
| Exceptions | |
| The argument Arg is not an integer | a type_error(integer, Arg) exception is thrown |
| The argument Arg result exceeds the integer range | an evaluation_error(int_overflow) exception is thrown |
| The argument Arg is a negative integer | an evaluation_error(negative, Arg) exception is thrown |