Skip to content

Allow min and max to work with Comparable's like DateTime #41902

Closed
@ChristianKleineidam

Description

@ChristianKleineidam

I have a list of DateTime string and want to know the latest DateTime in my list. If DateTime would not only provide .isBefore() and .isAfter() I should be able to get the latest DateTime in my list with max (from dart:math).

While I do grant that .isBefore() and .isAfter() are normally more readable, they aren't as easy to use with existing functionality like max and him so it would be useful to have the syntax for both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.library-coretype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions