We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2b98f5 commit 3379821Copy full SHA for 3379821
commands/license/renewal.php
@@ -6,12 +6,25 @@
6
7
return [
8
'description' => 'Show the renewal date of the activated Kirby license.',
9
+ 'args' => [
10
+ 'format' => [
11
+ 'prefix' => 'f',
12
+ 'longPrefix' => 'format',
13
+ 'description' => 'The format for the renewal date or "timestamp"',
14
+ 'defaultValue' => 'Y-m-d'
15
+ ]
16
+ ],
17
'command' => static function (CLI $cli): void {
18
$kirby = $cli->kirby();
19
20
$license = $kirby->system()->license();
21
+ $format = $cli->arg('format');
22
- $renewal = $license->renewal();
23
+ if (strtolower($format) === 'timestamp') {
24
+ $format = null;
25
+ }
26
+
27
+ $renewal = $license->renewal($format);
28
29
if ($renewal === null) {
30
$cli->error('No Kirby License is activated.');
0 commit comments