Difference between revisions of "Template:SetDatePropertyValue"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
(Created page with "<noinclude> This template is used to set a value of type date given the year, month, and day. Month and day are optional parameters. The template will also store all the parts...")
 
Line 15: Line 15:
 
  --><!-- set individual values and build the overall date string
 
  --><!-- set individual values and build the overall date string
 
  -->{{#if: {{{year|}}}
 
  -->{{#if: {{{year|}}}
   -->|{{#set: {{{property|}}} Year={{{year|}}}|}}<!--  
+
   -->|{{#set: {{{property|}}} Year={{{year|}}}|}}<!-- store year
 
   -->{{#if: {{{month|}}}<!--
 
   -->{{#if: {{{month|}}}<!--
     -->|{{#set: {{{property|}}} Month={{{month|}}}|}}<!--  
+
     -->|{{#set: {{{property|}}} Month={{{month|}}}|}}<!-- store month
    -->{{#vardefine: varDate|{{{year|}}}}}<!-- 
 
 
     -->{{#if: {{{day|}}}<!--
 
     -->{{#if: {{{day|}}}<!--
       -->|{{#set: {{{property|}}} Day={{{day|}}}|}}<!--
+
       -->|{{#set: {{{property|}}} Day={{{day|}}}|}}<!-- store day
 
       -->{{#vardefine: varDate|{{{day|}}} {{{month|}}} {{{year|}}}}}<!-- all components are present   
 
       -->{{#vardefine: varDate|{{{day|}}} {{{month|}}} {{{year|}}}}}<!-- all components are present   
 
       -->|{{#vardefine: varDate|{{{month|}}} {{{year|}}}}}<!-- only month and year are present
 
       -->|{{#vardefine: varDate|{{{month|}}} {{{year|}}}}}<!-- only month and year are present

Revision as of 21:10, 23 August 2016

This template is used to set a value of type date given the year, month, and day. Month and day are optional parameters. The template will also store all the parts individually to keep track of which parts of the date are incomplete.

NOTE: As any "set" template, it doesn't print anything on the page, but merely sets the appropriate values.

Parameters:

  • |property= - the name of the property.
  • |year= - the year.
  • |month= - the month.
  • |day= - the day.