JamesClarke Posted December 11, 2014 Share Posted December 11, 2014 Hi there, what I have been trying to do is add some additional logic.. My problem is I want to stop displaying the month and day after the year 2000? I know I need to add an if and else statement but this is my first actual project and I am a little stuck.. here is the page, it's a plugin for a timeline http://www.llandoveryheritage.org/project-timeline/ And the file is attached below.. any help would be appreciated. The plugin code was too long to just post in here, didn't want to cause any slow loading issues for people on a slow connection.. Thanks and I appreciate any help. annual_archive.php Quote Link to comment Share on other sites More sharing options...
ElectricOwl Posted January 2, 2015 Share Posted January 2, 2015 You need to provide snippets of code rather than entire scripts... However. You problem should be solvable with something like... function is_date_inrange($selected_timestamp) { if ($selected_timestamp > strtotime('2000-12-31 23:59:59')) { return false; } return true; } http://php.net/manual/en/function.strtotime.php There are other approaches but this ought to get you started. Cheers, Ian Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.