Skip to content

Commit 268f9cd

Browse files
Márton Polgárcoke
authored andcommitted
Remove numeric comparison operators from DateTime
The numeric comparison operators were previously documented here because they were specifically implemented for this type. However, this changed with rakudo/rakudo@72856df . Now, the fact that this type can be used with these operators is simply a natural consequence of the provided coercion.
1 parent 2458e99 commit 268f9cd

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

doc/Type/DateTime.rakudoc

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -424,54 +424,10 @@ L«C<Duration>|/type/Duration», preserving the time zone.
424424
say Duration.new(42) + DateTime.new(:2015year, :3600timezone);
425425
# OUTPUT: «2015-01-01T00:00:42+01:00␤»
426426

427-
=head2 sub infix:«<=>»
428-
429-
multi sub infix:«<=>»(DateTime:D \a, DateTime:D \b --> Order:D)
430-
431-
Compares the equivalent instant, returns the Order.
432-
433-
say DateTime.now <=> DateTime.now; # OUTPUT: «Less␤»
434-
435427
=head2 sub infix:<cmp>
436428

437429
multi sub infix:<cmp>(DateTime:D \a, DateTime:D \b --> Order:D)
438430

439431
Compares the equivalent instant, returns the Order.
440432

441-
=head2 sub infix:«<»
442-
443-
multi sub infix:«<»(DateTime:D \a, DateTime:D \b --> Bool:D)
444-
445-
Compares the equivalent instant, returns a C<Bool>
446-
447-
=head2 sub infix:«>»
448-
449-
multi sub infix:«>»(DateTime:D \a, DateTime:D \b --> Bool:D)
450-
451-
Compares the equivalent instant, returns a C<Bool>
452-
453-
=head2 sub infix:«<=»
454-
455-
multi sub infix:«<=»(DateTime:D \a, DateTime:D \b --> Bool:D)
456-
457-
Compares the equivalent instant, returns a C<Bool>
458-
459-
=head2 sub infix:«>=»
460-
461-
multi sub infix:«>=»(DateTime:D \a, DateTime:D \b --> Bool:D)
462-
463-
Compares the equivalent instant, returns a C<Bool>
464-
465-
=head2 sub infix:«==»
466-
467-
multi sub infix:«==»(DateTime:D \a, DateTime:D \b --> Bool:D)
468-
469-
Compares the equivalent instant, returns a C<Bool>
470-
471-
=head2 sub infix:«!=»
472-
473-
multi sub infix:«!=»(DateTime:D \a, DateTime:D \b --> Bool:D)
474-
475-
Compares the equivalent instant, returns a C<Bool>
476-
477433
=end pod

0 commit comments

Comments
 (0)