mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
Update _release.php
This commit is contained in:
parent
f7cea537b0
commit
90076497f3
1 changed files with 3 additions and 1 deletions
|
@ -46,13 +46,15 @@ $date = trim(fgets(STDIN));
|
|||
|
||||
if (empty($date)) {
|
||||
$date = date('d-m-Y');
|
||||
out("- Using current date: $date", 'success');
|
||||
out("- Using current date: $date", 'info');
|
||||
} else {
|
||||
// Validate date format (dd-mm-yyyy)
|
||||
$dateObj = DateTime::createFromFormat('d-m-Y', $date);
|
||||
if (!$dateObj || $dateObj->format('d-m-Y') !== $date) {
|
||||
out("Invalid date format. Expected format: DD-MM-YYYY", 'error');
|
||||
}
|
||||
|
||||
out("- Using date: $date", 'info');
|
||||
}
|
||||
|
||||
$content = file_get_contents($configFile);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue