Tell us what you are trying to do?
I would like to put a simple counter down, counting just Days, is it possible with toolset?
Is there any documentation that you are following?
Is there a similar example that we can see?
What is the link to your site?
Hello, no Toolset does not provide a built-in countdown feature like this. You might need custom programming or a 3rd-party plugin to achieve something fancy. I have a simple custom shortcode to help calculate the difference between two dates from another ticket:
add_shortcode( 'format_date_difference', 'format_date_difference_func');
function format_date_difference_func($atts = [])
{
$atts = shortcode_atts([
'start' => '',
'end' => '',
'format' => '%a days',
], $atts);
$datetime1 = new DateTime($atts['start']);
$datetime2 = new DateTime($atts['end']);
$interval = $datetime1->diff($datetime2);
return $interval->format($atts['format']);
}
It can be used to output the number of full days between two dates. You can supply the end date only to make the calculation dynamic based on "NOW", whenever the page is loaded. The accepted date format is YYYY-MM-DD. For example:
Just [format_date_difference start="" end="2021-12-25" format="%a"][/format_date_difference] days until Christmas Eve!
It outputs a number representing the number of full days between today the end date. That means on the day before the end date you supply, this shortcode will show "0" number of days. The intention is that you would also display the number of hours, minutes, seconds, etc by changing the "format" attribute per the dateinterval documentation below. If that's not what you want, you should set the end date one day later.
https://www.php.net/manual/en/dateinterval.format.php