Template:Countdown/expanded

From Combine OverWiki, the original Half-Life wiki and Portal wiki
Jump to: navigation, search

To assist anyone who can fix the countdown template, "event has already started" doesn't appear to trigger.

{{
	#ifeq:{{
		#expr:
		{{#time:U}} <
		{{
			#if:{{{timecode|}}}
			|{{{timecode|}}}
			|{{#time:U|
				{{{year}}}
				-{{{month|1}}}
				-{{{day|1}}}
				 {{{hour|00}}}
				:{{{minute|00}}}
				:{{{second|00}}}
			}}
		}}
	}}
	|1
	|{{
		#ifeq:{{
			#expr:
			{{#time:U}} <
			{{
				#if:{{{timecode|}}}
				|{{{timecode|}}}
				|{{#time:U|
					{{{year}}}
					-{{{month|1}}}
					-{{{day|1}}}
					 {{{hour|00}}}
					:{{{minute|00}}}
					:{{{second|00}}}
				}}
			}} - 86399
		}}
		|1
		|'''<span style="font-weight:bold; color:#d84431; font-size:130%">
			{{
				#expr:( 
					( 
						( 
							{{
								#if:{{{timecode|}}}
								|{{{timecode|}}}
								|{{#time:U|
									{{{year}}}
									-{{{month|1}}}
									-{{{day|1}}}
									 {{{hour|00}}}
									:{{{minute|00}}}
									:{{{second|00}}}
								}}
							}}
							 - {{#time:U}}
						) / 86400
					) -0.5
				) round 0
			}}
		</span>'''
		 <span style="font-weight:bold; font-size:130%">
			days<
		/span>
	|}}
	 <span style="font-weight:bold; font-size:130%">
		left before
	</span>
	 <span style="font-weight:bold; font-size:130%">
		{{{event|the event}}}
	</span>
	|{{
		#ifexist:{{{duration|}}}
		|{{
			#ifeq:{{
				#expr: (
					{{
						#if:{{{timecode|}}}
						|{{{timecode|}}}
						|{{#time:U|
							{{{year}}}
							-{{{month|1}}}
							-{{{day|1}}}
							 {{{hour|00}}}
							:{{{minute|00}}}
							:{{{second|00}}}
						}}
					}} + {{{duration}}}
				) > 
				{{#time:U}}
			}}
			|1
			|{{{
				eventstart
				|{{{event|The event}}}
			has already started.}}}
			|{{{eventend
				|{{{event|The event}} has already ended.
			}}}
		}}
		|{{{eventend|
			{{{event|The event}}}
			 has already ended.
		}}}
	}}
}}

— PPortal symbol.svgrtaler (about | complain) 05:54, 28 October 2015 (GMT)