Skip to content

Commit

Permalink
Remove UTMs for zonaminecraft.net
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Oct 10, 2024
1 parent 2ecd19e commit 2e87f0f
Show file tree
Hide file tree
Showing 11 changed files with 78 additions and 48 deletions.
5 changes: 4 additions & 1 deletion contribute/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,10 @@ <h2>/*pad()*/</h2>
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 ? '?' : '&amp;') + 'utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon';
}

Expand Down
5 changes: 4 additions & 1 deletion contribute/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,10 @@ <h2><a href="/contribute/docs/">Contribute to this documentation</a></h2>
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 ? '?' : '&amp;') + 'utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon';
}

Expand Down
5 changes: 4 additions & 1 deletion contribute/translate/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? '?' : '&amp;') + 'utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon';
}

Expand Down
5 changes: 4 additions & 1 deletion contribute/translators/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,10 @@ <h2>Thanks to people helping us to translate Carbon in so many languages</h2>
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 ? '?' : '&amp;') + 'utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon';
}

Expand Down
77 changes: 40 additions & 37 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ <h1 id="api-introduction">Introduction</h1>
$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.
Expand Down Expand Up @@ -281,16 +281,16 @@ <h1 id="api-instantiation">Instantiation</h1>

<p>
<pre class="live-editor"><code class="php">$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
</code></pre>
</p>

Expand Down Expand Up @@ -451,7 +451,7 @@ <h1 id="api-instantiation">Instantiation</h1>
// 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.
</code></pre>
</p>

Expand Down Expand Up @@ -705,7 +705,7 @@ <h1 id="api-localization">Localization</h1>
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
</code></pre>
</p>

Expand Down Expand Up @@ -736,13 +736,13 @@ <h1 id="api-localization">Localization</h1>
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
*/
</code></pre>
</p>
Expand All @@ -769,9 +769,9 @@ <h1 id="api-localization">Localization</h1>
]);
// 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();
Expand Down Expand Up @@ -1654,21 +1654,21 @@ <h1 id="api-localization">Localization</h1>

<p>
<pre class="live-editor"><code class="php">$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
</code></pre>
</p>

Expand Down Expand Up @@ -5588,7 +5588,7 @@ <h1 id="api-testing">Testing Aids</h1>
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 () {
Expand Down Expand Up @@ -5831,12 +5831,12 @@ <h1 id="api-getters">Getters</h1>

// 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"
Expand Down Expand Up @@ -6413,8 +6413,8 @@ <h1 id="api-comparison">Comparison</h1>

// 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
Expand Down Expand Up @@ -6909,7 +6909,7 @@ <h1 id="api-difference">Difference</h1>
greater than the other.</p>

<p>
<pre><code class="php">echo Carbon::now('America/Vancouver')->diffInSeconds(Carbon::now('Europe/London')); // 9.0E-6
<pre><code class="php">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');
Expand Down Expand Up @@ -7048,10 +7048,10 @@ <h1 id="api-difference">Difference</h1>

$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);

Expand Down Expand Up @@ -7704,9 +7704,9 @@ <h1 id="api-macro">Macro</h1>
// 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
</code></pre>
</p>

Expand Down Expand Up @@ -8951,7 +8951,7 @@ <h1 id="api-period">CarbonPeriod</h1>
$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
</code></pre>
</p>

Expand Down Expand Up @@ -10274,7 +10274,10 @@ <h1 id="api-carbon-2">Migrate to Carbon 2</h1>
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 ? '?' : '&amp;') + 'utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon';
}

Expand Down
5 changes: 4 additions & 1 deletion history/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? '?' : '&amp;') + 'utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon';
}

Expand Down
7 changes: 5 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ <h2 id="backers">Backers</h2>
" href="https://tomba.io/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Tomba.io" src="https://logo.clearbit.com/tomba.io" width="32" height="32"></a>
<a style="position: relative; margin: 5px; display: inline-block; border: 4px solid transparent; border-radius: 50%; overflow: hidden;" title="Providing YouTube views from ads for every business which is know as Youtube True View" href="https://youtubetrueview.com/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Youtube True View" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/5dbaded1-1a0d-469e-9248-6fa0dec567e9/youtube%20trueview.png" width="64" height="32"></a>
<a style="position: relative; margin: 5px; display: inline-block; border: 4px solid transparent; border-radius: 50%; overflow: hidden;" title="Buy real Instagram followers from Twicsy starting at only $2.97. Twicsy has been voted the best site to buy followers from the likes of US Magazine." href="https://twicsy.com/buy-instagram-followers?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Buy Instagram Followers Twicsy" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/f07b6f83-d0ed-43c6-91ae-ec8fa90512cd/twicsy-followers.png" width="39" height="32"></a>
<a style="position: relative; margin: 5px; display: inline-block; border: 4px solid transparent; border-radius: 50%; overflow: hidden;" title="Listamos servidores de Minecraft para que los propietarios puedan ofrecer a usuarios recompensas diarias por votar por su servidor." href="https://zonaminecraft.net?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="ZonaMinecraft" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/be53d69d-e385-4ba8-b031-b4915d4c5767/ZONAMV.png" width="32" height="32"></a>
<a style="position: relative; margin: 5px; display: inline-block; border: 4px solid transparent; border-radius: 50%; overflow: hidden;" title="Listamos servidores de Minecraft para que los propietarios puedan ofrecer a usuarios recompensas diarias por votar por su servidor." href="https://zonaminecraft.net" target="_blank"><img alt="ZonaMinecraft" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/be53d69d-e385-4ba8-b031-b4915d4c5767/ZONAMV.png" width="32" height="32"></a>
</span>
<br />
<span class="open-collective-list open-collective-helpers">
Expand Down Expand Up @@ -975,7 +975,10 @@ <h2 id="carbon-name">Why the name Carbon?</h2>
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 ? '?' : '&amp;') + 'utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon';
}

Expand Down
5 changes: 4 additions & 1 deletion laravel/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,10 @@ <h2>UTC is the reference</h2>
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 ? '?' : '&amp;') + 'utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon';
}

Expand Down
5 changes: 4 additions & 1 deletion symfony/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,10 @@ <h2>UTC is the reference</h2>
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 ? '?' : '&amp;') + 'utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon';
}

Expand Down
5 changes: 4 additions & 1 deletion template.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? '?' : '&amp;') + 'utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon';
}

Expand Down
2 changes: 1 addition & 1 deletion tools/generate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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, '?') ? '?' : '&amp;') . 'utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon';
}

Expand Down

0 comments on commit 2e87f0f

Please sign in to comment.