This commit is contained in:
Jay Trees 2022-03-23 14:54:47 +01:00
parent 6ac3804c60
commit 97d996a683
2 changed files with 5 additions and 6 deletions

View file

@ -1,18 +1,17 @@
<?php
/**
* getCurrentSeason
* getWishlistNameSuggestion
*
* Returns the current season
*/
function getCurrentSeason(): string
function getWishlistNameSuggestion(): string
{
$now = time();
$month = date('n');
$now = time();
$month = date('n');
$season = '';
$startOfYear = strtotime('01. January');
$startOfEaster = strtotime('15. April'); // Approximate
$startOfChristmas = strtotime('24. December');

View file

@ -121,7 +121,7 @@ $page->navigation();
<label><?= __('Name') ?></label>
<input type="text"
name="wishlist-name"
data-default="<?= getCurrentSeason() ?>"
data-default="<?= getWishlistNameSuggestion() ?>"
/>
</div>
</form>