Where are the Year ranges for date attributes located

Version 3 Solutions you have discovered or come across should go here. Questions should go in the other three Version 3 forums, thank you.
Forum rules
Please do not ask questions here, this is for Version 3 Solutions you have discovered or come across.

Where are the Year ranges for date attributes located

Postby invitations » 5:43am, Sun 02 Mar, 2014

I need to change the the three year default setting to 10years before and 10 years after
See below info

# year ranges. If you use dates, by default the drop down for year will be from
# three years before until 10 years after this the current value for year. If there
# is no current value the current year will be used.
# if you want to use a bigger range you can set the start and end year here
# be aware that the drop down may become very large.
# if set to 0 they will use the default behaviour. So I'm afraid you can't start with
# year 0. Also be aware not to set the end year to something relatively soon in the
# future, or it will stop working when you reach that year.
define('DATE_START_YEAR',0);
define('DATE_END_YEAR',0);

Regards Robert
invitations
phpList newbie
 
Posts: 2
Joined: 5:01am, Tue 25 Feb, 2014

Re: Where are the Year ranges for date attributes located

Postby Dragonrider » 9:36am, Thu 06 Mar, 2014

Simple answer is to put the year you want phpList to start from in place of the first 0

ie:
Code: Select all
define('DATE_START_YEAR',2004);
define('DATE_END_YEAR',2024);


just like it says in the text you pasted.

Or, if you want to keep the setting at a fixed ten years prior to (and ahead of) the current year:-
Code: Select all
$year=DATE("Y") -10;
$year2=DATE("Y") +10;
define('DATE_START_YEAR',$year);
define('DATE_END_YEAR',$year2);
My sites:- http://wharfedalefestival.co.uk, http://ilkleygardeners.org.uk, http://emergencyaid.net, http://dragonrider.co.uk
Latest phpList version is now 3.0.12 (3 February 2015) and requires a minimum of MySQL 5.0 and PHP 5.3.x
Dragonrider
Moderator
 
Posts: 3460
Joined: 6:58am, Sun 02 Jul, 2006
Location: Ilkley, West Yorkshire, United Kingdom


Return to Answers, HowTos, Tips and Tricks

Who is online

Users browsing this forum: No registered users and 1 guest