Hi,
> The question is how can I ignore the year-month-day input?
Easily, use the same numbers for year, month and day.
Instead of:
between_datime(D1, datime(_,_,_,6,00,00), datime(_,_,_,10,59,00))
in your rule, use:
between_datime(D1, datime(2010,8,20,6,00,00), datime(2010,8,20,10,59,00))
We can also modify the rule to check if the datime is valid. I think
it should give an error if it's not valid or complete (like you got.
Anyway, we can do anything you need.
I added you as a developer to the project, so you can commit. We need
you to provide your full name (email Darko and I), acknowledge and
agree to the current licence of the project (comply with the license,
don't commit code that challenges or changes the terms of the license
and keep in touch with us when you change your contact details in case
we ever need the agreement of all developers for any reason (change of
license, etc.)).
Another thing, after any commit you make, I appreciate if you test the
regression tests in the examples directory (runs all examples and says
if they were passed).
Paul.
> set_datime( current_datime(datime(T1_Y,T1_M,T1_D,T1_H,T1_Min,T1_S)),
> DT1, 6, 00, 00 )
Some languages allow all kinds of reification structures, but this is
a simple case that doesn't need any kind of special constructs.
Just call the current_datime/1 relation and use the arguments to bind
variables and pass values.
?- current_datime(datime(T1_Y,T1_M,T1_D,T1_H,T1_Min,T1_S)),
set_datime(datime(T1_Y,T1_M,T1_D,T1_H,T1_Min,T1_S),DT1,6,0,0).
Paul.