-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.library-coretype-documentationA request to add or improve documentationA request to add or improve documentation
Description
The documentation to DateTime.difference could be clearer about how the difference is computed. That is, instead of :
Returns a [Duration] with the difference between [this] and [other].
I think it'd be better as:
Returns a [Duration] with the difference subtracting [other] from [this].
Or instead of relying on readers to deduce it from the example code, explicitly state:
The returned [Duration] will be negative if [other] occurs after [this].
Even better would be to provide an operator - that allows one DateTime to be subtracted from the other without ambiguity.
(Dart VM version: 2.1.0 (Tue Nov 13 18:22:02 2018 +0100) on "linux_x64")
Metadata
Metadata
Assignees
Labels
area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.library-coretype-documentationA request to add or improve documentationA request to add or improve documentation