We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
DateTime.difference
1 parent 3fe146a commit d57a06aCopy full SHA for d57a06a
sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart
@@ -451,7 +451,7 @@ class DateTime {
451
452
@patch
453
Duration difference(DateTime other) {
454
- return Duration(milliseconds: _value - other._value);
+ return Duration(milliseconds: _value - other.millisecondsSinceEpoch);
455
}
456
457
sdk/lib/_internal/js_runtime/lib/core_patch.dart
@@ -345,7 +345,7 @@ class DateTime {
345
346
347
348
- return new Duration(milliseconds: _value - other._value);
+ return new Duration(milliseconds: _value - other.millisecondsSinceEpoch);
349
350
351
0 commit comments