From 2e87f0faf312861d8daa27069b33079847d9e37e Mon Sep 17 00:00:00 2001 From: kylekatarnls Date: Thu, 10 Oct 2024 20:24:13 +0200 Subject: [PATCH] Remove UTMs for zonaminecraft.net --- contribute/docs/index.html | 5 +- contribute/index.html | 5 +- contribute/translate/index.html | 5 +- contribute/translators/index.html | 5 +- docs/index.html | 77 ++++++++++++++++--------------- history/index.html | 5 +- index.html | 7 ++- laravel/index.html | 5 +- symfony/index.html | 5 +- template.src.html | 5 +- tools/generate.php | 2 +- 11 files changed, 78 insertions(+), 48 deletions(-) diff --git a/contribute/docs/index.html b/contribute/docs/index.html index 3e3c6ab931..8395e0ed63 100644 --- a/contribute/docs/index.html +++ b/contribute/docs/index.html @@ -806,7 +806,10 @@

/*pad()*/

backer: 5, })[member.status] || 3; - if (['onlinekasyno-polis.pl'].indexOf((new URL(href)).host) === -1) { + if ([ + 'onlinekasyno-polis.pl', + 'zonaminecraft.net', + ].indexOf((new URL(href)).host) === -1) { href += (href.indexOf('?') === -1 ? '?' : '&') + 'utm_source=opencollective&utm_medium=github&utm_campaign=Carbon'; } diff --git a/contribute/index.html b/contribute/index.html index 0d5c2f66c3..69b6a1feb5 100644 --- a/contribute/index.html +++ b/contribute/index.html @@ -728,7 +728,10 @@

Contribute to this documentation

backer: 5, })[member.status] || 3; - if (['onlinekasyno-polis.pl'].indexOf((new URL(href)).host) === -1) { + if ([ + 'onlinekasyno-polis.pl', + 'zonaminecraft.net', + ].indexOf((new URL(href)).host) === -1) { href += (href.indexOf('?') === -1 ? '?' : '&') + 'utm_source=opencollective&utm_medium=github&utm_campaign=Carbon'; } diff --git a/contribute/translate/index.html b/contribute/translate/index.html index efbca3fd42..b81a36a27b 100644 --- a/contribute/translate/index.html +++ b/contribute/translate/index.html @@ -728,7 +728,10 @@ backer: 5, })[member.status] || 3; - if (['onlinekasyno-polis.pl'].indexOf((new URL(href)).host) === -1) { + if ([ + 'onlinekasyno-polis.pl', + 'zonaminecraft.net', + ].indexOf((new URL(href)).host) === -1) { href += (href.indexOf('?') === -1 ? '?' : '&') + 'utm_source=opencollective&utm_medium=github&utm_campaign=Carbon'; } diff --git a/contribute/translators/index.html b/contribute/translators/index.html index 945770949f..39b16f5ff9 100644 --- a/contribute/translators/index.html +++ b/contribute/translators/index.html @@ -1708,7 +1708,10 @@

Thanks to people helping us to translate Carbon in so many languages

backer: 5, })[member.status] || 3; - if (['onlinekasyno-polis.pl'].indexOf((new URL(href)).host) === -1) { + if ([ + 'onlinekasyno-polis.pl', + 'zonaminecraft.net', + ].indexOf((new URL(href)).host) === -1) { href += (href.indexOf('?') === -1 ? '?' : '&') + 'utm_source=opencollective&utm_medium=github&utm_campaign=Carbon'; } diff --git a/docs/index.html b/docs/index.html index 59effb3c68..59574bf941 100644 --- a/docs/index.html +++ b/docs/index.html @@ -133,13 +133,13 @@

Introduction

$modifiedImmutable = CarbonImmutable::now()->add(1, 'day'); var_dump($modifiedMutable === $mutable); // bool(true) -var_dump($mutable->isoFormat('dddd D')); // string(11) "Thursday 10" -var_dump($modifiedMutable->isoFormat('dddd D')); // string(11) "Thursday 10" +var_dump($mutable->isoFormat('dddd D')); // string(9) "Friday 11" +var_dump($modifiedMutable->isoFormat('dddd D')); // string(9) "Friday 11" // So it means $mutable and $modifiedMutable are the same object // both set to now + 1 day. var_dump($modifiedImmutable === $immutable); // bool(false) -var_dump($immutable->isoFormat('dddd D')); // string(11) "Wednesday 9" -var_dump($modifiedImmutable->isoFormat('dddd D')); // string(11) "Thursday 10" +var_dump($immutable->isoFormat('dddd D')); // string(11) "Thursday 10" +var_dump($modifiedImmutable->isoFormat('dddd D')); // string(9) "Friday 11" // While $immutable is still set to now and cannot be changed and // $modifiedImmutable is a new instance created from $immutable // set to now + 1 day. @@ -281,16 +281,16 @@

Instantiation

$now = Carbon::now();
-echo $now;                               // 2024-10-09 22:29:15
+echo $now;                               // 2024-10-10 18:20:43
 echo "\n";
 $today = Carbon::today();
-echo $today;                             // 2024-10-09 00:00:00
+echo $today;                             // 2024-10-10 00:00:00
 echo "\n";
 $tomorrow = Carbon::tomorrow('Europe/London');
-echo $tomorrow;                          // 2024-10-10 00:00:00
+echo $tomorrow;                          // 2024-10-11 00:00:00
 echo "\n";
 $yesterday = Carbon::yesterday();
-echo $yesterday;                         // 2024-10-08 00:00:00
+echo $yesterday;                         // 2024-10-09 00:00:00
 

@@ -451,7 +451,7 @@

Instantiation

// 19:15 in Johannesburg echo 'Meeting starts at '.$meeting->format('H:i').' in Johannesburg.'; // Meeting starts at 19:15 in Johannesburg. // now in Johannesburg -echo "It's ".$meeting->nowWithSameTz()->format('H:i').' right now in Johannesburg.'; // It's 00:29 right now in Johannesburg. +echo "It's ".$meeting->nowWithSameTz()->format('H:i').' right now in Johannesburg.'; // It's 20:20 right now in Johannesburg.

@@ -705,7 +705,7 @@

Localization

echo "\n"; echo $date->monthName; // octobre echo "\n"; -echo $date->isoFormat('LLLL'); // mercredi 9 octobre 2024 22:29 +echo $date->isoFormat('LLLL'); // jeudi 10 octobre 2024 18:20

@@ -736,13 +736,13 @@

Localization

echo $toDisplay; /* 15 juin 2018 14:34 -Aujourd’hui à 00:29 +Aujourd’hui à 20:20 */ echo $notificationForJohn; /* Jun 15, 2018 7:34 AM -Today at 5:29 PM +Today at 1:20 PM */

@@ -769,9 +769,9 @@

Localization

]); // Important note: timezone setting calls ->shiftTimezone() and not ->setTimezone(), // It means it does not just set the timezone, but shift the time too: -echo Carbon::today()->setTimezone('Asia/Tokyo')->format('d/m G\h e'); // 09/10 9h Asia/Tokyo +echo Carbon::today()->setTimezone('Asia/Tokyo')->format('d/m G\h e'); // 10/10 9h Asia/Tokyo echo "\n"; -echo Carbon::today()->shiftTimezone('Asia/Tokyo')->format('d/m G\h e'); // 09/10 0h Asia/Tokyo +echo Carbon::today()->shiftTimezone('Asia/Tokyo')->format('d/m G\h e'); // 10/10 0h Asia/Tokyo // You can find back which factory created a given object: $a = $factory->now(); @@ -1654,21 +1654,21 @@

Localization

$date = CarbonImmutable::now();
-echo $date->calendar();                                      // Today at 10:29 PM
+echo $date->calendar();                                      // Today at 6:20 PM
 echo "\n";
-echo $date->sub('1 day 3 hours')->calendar();                // Yesterday at 7:29 PM
+echo $date->sub('1 day 3 hours')->calendar();                // Yesterday at 3:20 PM
 echo "\n";
-echo $date->sub('3 days 10 hours 23 minutes')->calendar();   // Last Sunday at 12:06 PM
+echo $date->sub('3 days 10 hours 23 minutes')->calendar();   // Last Monday at 7:57 AM
 echo "\n";
-echo $date->sub('8 days')->calendar();                       // 10/01/2024
+echo $date->sub('8 days')->calendar();                       // 10/02/2024
 echo "\n";
-echo $date->add('1 day 3 hours')->calendar();                // Friday at 1:29 AM
+echo $date->add('1 day 3 hours')->calendar();                // Tomorrow at 9:20 PM
 echo "\n";
-echo $date->add('3 days 10 hours 23 minutes')->calendar();   // Sunday at 8:52 AM
+echo $date->add('3 days 10 hours 23 minutes')->calendar();   // Monday at 4:43 AM
 echo "\n";
-echo $date->add('8 days')->calendar();                       // 10/17/2024
+echo $date->add('8 days')->calendar();                       // 10/18/2024
 echo "\n";
-echo $date->locale('fr')->calendar();                        // Aujourd’hui à 22:29
+echo $date->locale('fr')->calendar();                        // Aujourd’hui à 18:20
 

@@ -5588,7 +5588,7 @@

Testing Aids

var_dump(Carbon::hasTestNow()); // bool(true) Carbon::setTestNow(); // clear the mock var_dump(Carbon::hasTestNow()); // bool(false) -echo Carbon::now(); // 2024-10-09 22:29:17 +echo Carbon::now(); // 2024-10-10 18:20:44 // Instead of mock and clear mock, you also can use withTestNow(): Carbon::withTestNow('2010-09-15', static function () { @@ -5831,12 +5831,12 @@

Getters

// You can get any property dynamically too: $unit = 'second'; -var_dump(Carbon::now()->get($unit)); // int(17) +var_dump(Carbon::now()->get($unit)); // int(44) // equivalent to: -var_dump(Carbon::now()->$unit); // int(17) +var_dump(Carbon::now()->$unit); // int(44) // If you have plural unit name, use singularUnit() $unit = Carbon::singularUnit('seconds'); -var_dump(Carbon::now()->get($unit)); // int(17) +var_dump(Carbon::now()->get($unit)); // int(44) // Prefer using singularUnit() because some plurals are not the word with S: var_dump(Carbon::pluralUnit('century')); // string(9) "centuries" var_dump(Carbon::pluralUnit('millennium')); // string(9) "millennia" @@ -6413,8 +6413,8 @@

Comparison

// now is the default param $dt1 = Carbon::createMidnightDate(2000, 1, 1); -echo $dt1->max(); // 2024-10-09 22:29:17 -echo $dt1->maximum(); // 2024-10-09 22:29:17 +echo $dt1->max(); // 2024-10-10 18:20:44 +echo $dt1->maximum(); // 2024-10-10 18:20:44 // Remember min and max PHP native function work fine with dates too: echo max(Carbon::create('2002-03-15'), Carbon::create('2003-01-07'), Carbon::create('2002-08-25')); // 2003-01-07 00:00:00 @@ -6909,7 +6909,7 @@

Difference

greater than the other.

-

echo Carbon::now('America/Vancouver')->diffInSeconds(Carbon::now('Europe/London')); // 9.0E-6
+    
echo Carbon::now('America/Vancouver')->diffInSeconds(Carbon::now('Europe/London')); // 1.1E-5
 
 $dtOttawa = Carbon::createMidnightDate(2000, 1, 1, 'America/Toronto');
 $dtVancouver = Carbon::createMidnightDate(2000, 1, 1, 'America/Vancouver');
@@ -7048,10 +7048,10 @@ 

Difference

$date = Carbon::now()->addSeconds(3666); -echo $date->diffInSeconds(); // -3665.99991 -echo $date->diffInMinutes(); // -61.0999969 -echo $date->diffInHours(); // -1.0183332591667 -echo $date->diffInDays(); // -0.042430551574074 +echo $date->diffInSeconds(); // -3665.999871 +echo $date->diffInMinutes(); // -61.099996166667 +echo $date->diffInHours(); // -1.0183332411111 +echo $date->diffInDays(); // -0.042430550706019 $date = Carbon::create(2016, 1, 5, 22, 40, 32); @@ -7704,9 +7704,9 @@

Macro

// Then now you can easily display any date in a page/e-mail using those user settings and the chosen format echo Carbon::parse($dateString, 'UTC')->formatForUser(); // 23/01/2010 echo "\n"; -echo Carbon::tomorrow()->formatForUser(); // Aujourd’hui à 02:00 +echo Carbon::tomorrow()->formatForUser(); // Demain à 02:00 echo "\n"; -echo Carbon::now()->subDays(3)->formatForUser(); // lundi dernier à 00:29 +echo Carbon::now()->subDays(3)->formatForUser(); // lundi dernier à 20:20

@@ -8951,7 +8951,7 @@

CarbonPeriod

$days[] = $date->format('Y-m-d'); } -echo implode(', ', $days); // 2024-10-09, 2024-10-10, 2024-10-11 +echo implode(', ', $days); // 2024-10-10, 2024-10-11, 2024-10-12

@@ -10274,7 +10274,10 @@

Migrate to Carbon 2

backer: 5, })[member.status] || 3; - if (['onlinekasyno-polis.pl'].indexOf((new URL(href)).host) === -1) { + if ([ + 'onlinekasyno-polis.pl', + 'zonaminecraft.net', + ].indexOf((new URL(href)).host) === -1) { href += (href.indexOf('?') === -1 ? '?' : '&') + 'utm_source=opencollective&utm_medium=github&utm_campaign=Carbon'; } diff --git a/history/index.html b/history/index.html index cea3a63a8d..1a544e443e 100644 --- a/history/index.html +++ b/history/index.html @@ -724,7 +724,10 @@ backer: 5, })[member.status] || 3; - if (['onlinekasyno-polis.pl'].indexOf((new URL(href)).host) === -1) { + if ([ + 'onlinekasyno-polis.pl', + 'zonaminecraft.net', + ].indexOf((new URL(href)).host) === -1) { href += (href.indexOf('?') === -1 ? '?' : '&') + 'utm_source=opencollective&utm_medium=github&utm_campaign=Carbon'; } diff --git a/index.html b/index.html index 0140d2ca31..07b8a6c008 100644 --- a/index.html +++ b/index.html @@ -265,7 +265,7 @@

Backers

" href="https://tomba.io/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank">Tomba.io Youtube True View Buy Instagram Followers Twicsy - ZonaMinecraft + ZonaMinecraft
@@ -975,7 +975,10 @@

Why the name Carbon?

backer: 5, })[member.status] || 3; - if (['onlinekasyno-polis.pl'].indexOf((new URL(href)).host) === -1) { + if ([ + 'onlinekasyno-polis.pl', + 'zonaminecraft.net', + ].indexOf((new URL(href)).host) === -1) { href += (href.indexOf('?') === -1 ? '?' : '&') + 'utm_source=opencollective&utm_medium=github&utm_campaign=Carbon'; } diff --git a/laravel/index.html b/laravel/index.html index 8d8bd2e4b9..1c79a023a2 100644 --- a/laravel/index.html +++ b/laravel/index.html @@ -914,7 +914,10 @@

UTC is the reference

backer: 5, })[member.status] || 3; - if (['onlinekasyno-polis.pl'].indexOf((new URL(href)).host) === -1) { + if ([ + 'onlinekasyno-polis.pl', + 'zonaminecraft.net', + ].indexOf((new URL(href)).host) === -1) { href += (href.indexOf('?') === -1 ? '?' : '&') + 'utm_source=opencollective&utm_medium=github&utm_campaign=Carbon'; } diff --git a/symfony/index.html b/symfony/index.html index d389d7c87f..33f2f3acd8 100644 --- a/symfony/index.html +++ b/symfony/index.html @@ -915,7 +915,10 @@

UTC is the reference

backer: 5, })[member.status] || 3; - if (['onlinekasyno-polis.pl'].indexOf((new URL(href)).host) === -1) { + if ([ + 'onlinekasyno-polis.pl', + 'zonaminecraft.net', + ].indexOf((new URL(href)).host) === -1) { href += (href.indexOf('?') === -1 ? '?' : '&') + 'utm_source=opencollective&utm_medium=github&utm_campaign=Carbon'; } diff --git a/template.src.html b/template.src.html index d15f8761c9..92c9d992cd 100644 --- a/template.src.html +++ b/template.src.html @@ -723,7 +723,10 @@ backer: 5, })[member.status] || 3; - if (['onlinekasyno-polis.pl'].indexOf((new URL(href)).host) === -1) { + if ([ + 'onlinekasyno-polis.pl', + 'zonaminecraft.net', + ].indexOf((new URL(href)).host) === -1) { href += (href.indexOf('?') === -1 ? '?' : '&') + 'utm_source=opencollective&utm_medium=github&utm_campaign=Carbon'; } diff --git a/tools/generate.php b/tools/generate.php index 2c9f7ef057..5c705c13ea 100644 --- a/tools/generate.php +++ b/tools/generate.php @@ -378,7 +378,7 @@ function getOpenCollective(string $status): string }; $width = $validImage ? round($x * $height / $y) : $height; - if (!str_contains($href, 'utm_source') && !preg_match('/^https?:\/\/onlinekasyno-polis\.pl(\/.*)?$/', $href)) { + if (!str_contains($href, 'utm_source') && !preg_match('/^https?:\/\/(?:onlinekasyno-polis\.pl|zonaminecraft\.net)(\/.*)?$/', $href)) { $href .= (!str_contains($href, '?') ? '?' : '&') . 'utm_source=opencollective&utm_medium=github&utm_campaign=Carbon'; }