T(-) Countdown Proper Time Unit Calculation


Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 739

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 740

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 741

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 742

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 743

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 744

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 907

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 739

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 740

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 741

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 742

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 743

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 744

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 907

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 739

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 740

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 741

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 742

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 743

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 744

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 907

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 739

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 740

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 741

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 742

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 743

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 744

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 907

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 739

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 740

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 741

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 742

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 743

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 744

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 907

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 739

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 740

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 741

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 742

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 743

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 744

Warning: date() expects parameter 2 to be integer, string given in /var/www/vhosts/spacedonkey.de/httpdocs/wp-content/plugins/t-countdown-control/t-countdown-control.php on line 907

we should only have to calculate year, month and week time units once, as they will likely change only one time per viewing. Even so, we will need to properly calculate the amount of days, weeks and months remain, depending on how many time units are currently being displayed. We use a test of +410 days and 10 seconds from now to test how the change over works for the larger time units.

Test 1 – Showing Everything

This test should show everything: Years, Months, Weeks, Days… and the rest.
[tminus t="+410 days +10 sec" style="TIE-fighter"/]

Wk.
5
8
Tage
0
4
Hours
0
0
Minutes
0
0
Seconds
1
0

Test 2 – No Weeks

This test should show everything: Years, Months, Weeks, Days… and the rest.
[tminus t="+396 days +10 sec" omitweeks="true" style="TIE-fighter"/]

Tage
3
9
6
Hours
0
0
Minutes
0
0
Seconds
1
0

Test 3 – No Months

This test should show everything: Years, Months, Weeks, Days… and the rest.
[tminus t="+394 days +10 sec" omitmonths="true" style="TIE-fighter"/]

Wk.
5
6
Tage
0
2
Hours
0
0
Minutes
0
0
Seconds
1
0

Test 4 – No Months or Years

This test should show everything: Years, Months, Weeks, Days… and the rest.
[tminus t="+394 days +10 sec" omitmonths="true" omityears="true" style="TIE-fighter"/]

Wk.
5
6
Tage
0
2
Hours
0
0
Minutes
0
0
Seconds
1
0

Test 5 – No Months or Weeks

This test should show: Years and days.
[tminus t="+366 days +10 sec" omitmonths="true" omitweeks="true" style="TIE-fighter"/]

Tage
3
6
6
Hours
0
0
Minutes
0
0
Seconds
1
0

Test 6 – Days Only

This test should show only days:
[tminus t="+45 days" omityears="true" omitmonths="true" omitweeks="true"/]

Tage
4
5
Hours
0
0
Minutes
0
0
Seconds
0
0

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.