brick / date-time

Date and time library for PHP
MIT License
335 stars 30 forks source link

LocalDate::utc() method #111

Open zjbarg opened 2 months ago

zjbarg commented 2 months ago

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.