|Did you know ...||Search Documentation:|
|Pack julian -- prolog/julian.pl|
Here are some acceptable values of Form.
today- the set of all nanoseconds in the local day
now- the current nanosecond
dow(tuesday)- the set of all Tuesdays in history
dow([saturday,sunday])- set of all weekends in history
month(july)- the set of all Julys in history
month([june,july])- the set of all Junes and Julys ever
unix(EpochSeconds)- floating point seconds since the Unix epoch
gregorian(Year,Month,Day)- all seconds in a Gregorian date of the given form. For example,
gregorian(_,3,_)represents the set of all the months of March in history.
Year-Month-Day- same as
midnight- shortcut for
noon- shortcut for
final_moment- shortcut for
after(Form)- all times after Form
before(Form)- all times before Form
future- alias for
past- alias for
rfc3339(Text)- the nanosecond indicated by the RFC 3339 date string. Text can be atom or codes or string.
nth(N,Form)- Nth day (1-based) that matches Form in the month. N can be a list of days in which case form_time/2 is multi. This form isn't yet as flexible in different modes as I'd like.
true- noop constraint that matches all dates
mjn(Mjn)- modified Julian nanoseconds
This predicate is multifile because other modules can support different calendars, different holiday schedules, extra sugar, etc.
A and B can be given as datetime values or forms. For example, this is a legitimate goal:
compare_time(Order, now, unix(1375475330.414)).
days(Days)- integer days (ignores all time components)
ns(Nanoseconds)- integer nanoseconds
ms(Millis)- integer milliseconds
s(Seconds)- integer seconds