From 005e496e1e5b7039efa2a71eaad08c720b3b3441 Mon Sep 17 00:00:00 2001 From: niku <10890+niku@users.noreply.github.com> Date: Tue, 10 Aug 2021 11:58:34 +0000 Subject: [PATCH] Fix isAfter method code example on DateTime class The code example looks similar as [isBefore method](https://github.com/dart-lang/sdk/blob/b8d040e5239e02b945b529347d0b980fc8a26db2/sdk/lib/core/date_time.dart#L405-L417) except in this change. Closes https://github.com/dart-lang/sdk/pull/46847 https://github.com/dart-lang/sdk/pull/46847 GitOrigin-RevId: 4087032bcbd64e8aaf58dab81babb971d4642c86 Change-Id: I0b01d82ce4fad9ae076c4a1d46ee03cbc3b08d25 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209460 Reviewed-by: Lasse R.H. Nielsen Commit-Queue: Lasse R.H. Nielsen --- sdk/lib/core/date_time.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/lib/core/date_time.dart b/sdk/lib/core/date_time.dart index ab353ba0392..a3377cd883e 100644 --- a/sdk/lib/core/date_time.dart +++ b/sdk/lib/core/date_time.dart @@ -432,8 +432,8 @@ class DateTime implements Comparable { /// assert(later.isAfter(now.toUtc())); /// assert(later.toUtc().isAfter(now)); /// - /// assert(!now.toUtc().isBefore(now)); - /// assert(!now.isBefore(now.toUtc())); + /// assert(!now.toUtc().isAfter(now)); + /// assert(!now.isAfter(now.toUtc())); /// ``` external bool isAfter(DateTime other);