Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add abs and isNegative to Duration #9789

Closed
DartBot opened this issue Apr 9, 2013 · 2 comments
Closed

Add abs and isNegative to Duration #9789

DartBot opened this issue Apr 9, 2013 · 2 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-core type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Apr 9, 2013

This issue was originally filed by @seaneagan


abs is especially useful on the result of DateTime.difference
isNegative is useful for precondition checking

currently one has to do:

new Duration(microseconds: duration.inMicroseconds.abs())
duration.inMicroseconds.isNegative

@lrhn
Copy link
Member

lrhn commented Apr 9, 2013

Removed Type-Defect label.
Added Type-Enhancement, Area-Library, Library-Core, Triaged labels.

@srawlins
Copy link
Member

Fixed with https://code.google.com/p/dart/source/detail?r=38973


Added Fixed label.

@DartBot DartBot added Type-Enhancement area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-core labels Sep 24, 2014
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-core type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants