Difference between revisions of "GetCompanyDates"

From Sega Retro

(DPL is too slow)
 
(One intermediate revision 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={{delink|{{{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={{delink|{{{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