Difference between revisions of "Template:SetDatePropertyValue"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
 
Line 30: Line 30:
 
       -->{{#set: {{{property|}}} Month={{#time:F|{{{day|}}} {{{month|}}} {{{year|}}} }}|}}<!-- store month
 
       -->{{#set: {{{property|}}} Month={{#time:F|{{{day|}}} {{{month|}}} {{{year|}}} }}|}}<!-- store month
 
       -->{{#set: {{{property|}}} Day={{#time:j|{{{day|}}} {{{month|}}} {{{year|}}} }}|}}<!-- store day
 
       -->{{#set: {{{property|}}} Day={{#time:j|{{{day|}}} {{{month|}}} {{{year|}}} }}|}}<!-- store day
       -->{{#set: {{{property|}}}={{#time:j F Y|{{{day|}}} {{{month|}}} {{{year|}}} }} {{#ifeq: {{{era|CE}}}|BCE|BCE|}} |}}<!-- all components are present 
+
       -->{{#set: {{{property|}}}={{#time:j F Y|{{{day|}}} {{{month|}}} {{{year|}}} }} {{#ifeq: {{{era|CE}}}|BCE|BCE|}} |}}<!-- all components are given
 
       -->|{{#set: {{{property|}}} Year={{#time:Y|28 {{{month|}}} {{{year|}}} }}|}}<!-- store year
 
       -->|{{#set: {{{property|}}} Year={{#time:Y|28 {{{month|}}} {{{year|}}} }}|}}<!-- store year
 
       -->{{#set: {{{property|}}} Month={{#time:F|28 {{{month|}}} {{{year|}}} }}|}}<!-- store month
 
       -->{{#set: {{{property|}}} Month={{#time:F|28 {{{month|}}} {{{year|}}} }}|}}<!-- store month
       -->{{#set: {{{property|}}}={{#time:F Y|28 {{{month|}}} {{{year|}}} }} {{#ifeq: {{{era|CE}}}|BCE|BCE|}} |}}<!-- only month and year are present
+
       -->{{#set: {{{property|}}}={{#time:F Y|28 {{{month|}}} {{{year|}}} }} {{#ifeq: {{{era|CE}}}|BCE|BCE|}} |}}<!-- only month and year are given
 
     -->}}<!-- if day
 
     -->}}<!-- if day
 
     -->|{{#set: {{{property|}}} Year={{#time:Y|{{{year|}}} }}|}}<!-- store year  
 
     -->|{{#set: {{{property|}}} Year={{#time:Y|{{{year|}}} }}|}}<!-- store year  
     -->{{#set: {{{property|}}}={{#time:Y|{{{year|}}}}} {{#ifeq: {{{era|CE}}}|BCE|BCE|}} |}}<!-- only year is present 
+
     -->{{#set: {{{property|}}}={{#time:Y|{{{year|}}}}} {{#ifeq: {{{era|CE}}}|BCE|BCE|}} |}}<!-- only year is given
 
   -->}}<!-- if month
 
   -->}}<!-- if month
 
   --><!--
 
   --><!--

Latest revision as of 01:36, 26 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.

The template will store up to four values:

  • {{{property|}}} - the combined date.
  • {{{property|}}} Era - BCE or CE; default is CE.
  • {{{property|}}} Year - the year part.
  • {{{property|}}} Month - the month part.
  • {{{property|}}} Day - the day part.
  • {{{property|}}} Approximate - if Yes, the date is approximate; the default is No.

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.
  • |era= - the era: BCE or CE. The default is CE.
  • |year= - the year; mandatory.
  • |month= - the month.
  • |day= - the day.
  • |approximate= - if Yes, the date will be considered approximate (circa); this value is not passed to SMW, since the latter doesn't support approximate dates, but will be useful when printing dates (e.g. circa. 480 BC).