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 <?php
/** /**
* getCurrentSeason * getWishlistNameSuggestion
* *
* Returns the current season * Returns the current season
*/ */
function getCurrentSeason(): string function getWishlistNameSuggestion(): string
{ {
$now = time(); $now = time();
$month = date('n'); $month = date('n');
$season = ''; $season = '';
$startOfYear = strtotime('01. January');
$startOfEaster = strtotime('15. April'); // Approximate $startOfEaster = strtotime('15. April'); // Approximate
$startOfChristmas = strtotime('24. December'); $startOfChristmas = strtotime('24. December');

View file

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