Changeset 13541 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event.php
- Timestamp:
- 04/16/2024 12:41:37 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event.php
r13529 r13541 3 3 namespace Wporg\TranslationEvents\Event; 4 4 5 use DateTimeImmutable; 5 6 use DateTimeZone; 6 7 use Exception; … … 87 88 } 88 89 90 public function is_active(): bool { 91 $now = new DateTimeImmutable( 'now', new DateTimeZone( 'UTC' ) ); 92 return $now >= $this->start->utc() && $now < $this->end->utc(); 93 } 94 95 public function is_past(): bool { 96 return $this->end->is_in_the_past(); 97 } 98 89 99 public function timezone(): DateTimeZone { 90 100 return $this->timezone;
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)