Skip to content

time: Add after or equal and before or equal #49255

@sashamelentyev

Description

@sashamelentyev

Need AfterOrEqual and BeforeOrEqual methods in time package

If you need check t after or equal you code this

if time.After(u) || time.Equal(u) {
    // ...
}

With needed methods

if time.AfterOrEqual(u) {
    // ...
}

Code look cleaner

#49252

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions