Greetings,

S32/Temporal says a DateTime object can be maniplated like so:
    $dt.delta(44, minutes);

Rakudo's core/Temporal.pm contains this:

    my enum TimeUnit (
        :second(1), :seconds(2),
        :minute(3), :minutes(4),
        [snip]
    );

which is used in the signature of both DateTime and Date's delta methods:
    method delta($amount, TimeUnit $unit) {
which I think means delta() can't be called outside of the scope of
the Temporal.pm file.

If I try running the synopsis example, I get the following error:
    Undeclared routine: minutes used at line 1

The test files
S32-temporal/Date.t and
S32-temporal/DateTime.t
both die on the delta tests.

Should the TimeUnit enumeration be changed to "is export" ?

Rather than export those 14 keys into the global namespace, would it
make more sense for the spec to be something more like this:
    $dt.delta( :minute(44) );
using the same argument conventions as DateTime.new() ?

Regards,
Carl

Reply via email to