Difference between revisions of "GetCompanyDates"

From Sega Retro

(Created page with "<includeonly><div style="display:none;">{{#vardefine:companystartdate|{{stripref|{{#dpl: |titlematch={{{1|}}} |noresultsheader= |include={CompanyBob}:founded |mode=userformat...")
 
(DPL is too slow)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div style="display:none;">{{#vardefine:companystartdate|{{stripref|{{#dpl:
+
<includeonly><div style="display:none;">{{#cargo_query:
|titlematch={{{1|}}}
+
table=companydetails
|noresultsheader=
+
|fields=start,end
|include={CompanyBob}:founded
+
|where=company="{{delink|{{{1|}}}}}"
|mode=userformat
+
|limit=1
|secseparators=,
+
|default=
}}}}}}
+
|more results text=
 
+
|format=template
{{#vardefine:companyenddate|{{stripref|{{#dpl:
+
|template=GetCompanyDates/Cargo
|titlematch={{{1|}}}
+
}}
|noresultsheader=
 
|include={CompanyBob}:defunct
 
|mode=userformat
 
|secseparators=,
 
}}}}}}
 
 
 
 
{{#ifexpr:{{#len:{{#var:companystartdate}}}} < 10|{{#vardefine:companystartdate|{{#var:companystartdate}}-01}}|}}
 
{{#ifexpr:{{#len:{{#var:companystartdate}}}} < 10|{{#vardefine:companystartdate|{{#var:companystartdate}}-01}}|}}
 
{{#ifexpr:{{#len:{{#var:companystartdate}}}} < 10|{{#vardefine:companystartdate|{{#var:companystartdate}}-01}}|}}
 
{{#ifexpr:{{#len:{{#var:companystartdate}}}} < 10|{{#vardefine:companystartdate|{{#var:companystartdate}}-01}}|}}

Latest revision as of 06:02, 30 July 2022

Get start and end dates of a company - store in #var:companystartdate and #var:companyenddate

Examples

{{GetCompanyDates|Sega AM1}}
{{#var:companystartdate}} {{#var:companyenddate}}




1992-01-01 1999-05-11