8000 LocalDate::utc() method · Issue #111 · brick/date-time · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
LocalDate::utc() method #111
Open
Open
@zjbarg

Description

@zjbarg

Hey!

What do you think about adding something like this to LocalDate

public static function utc(Clock $clock = null): LocalDate // or nowUtc
{
    return LocalDate::now(TimeZone::utc(), $clock);
}

and the same idea to LocalDateTime?

I'm doing this in my code LocalDate::now(TimeZone::utc()) and I'm wondering if a simpler syntax makes sense to other users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0