Skip to content

Commit

Permalink
Localize IEEE dates (#5835)
Browse files Browse the repository at this point in the history
  • Loading branch information
adam3smith authored Jan 11, 2022
1 parent 588fbfe commit 070586b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 25 deletions.
26 changes: 16 additions & 10 deletions ieee-with-url.csl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
</info>
<locale xml:lang="en">
<date form="text">
<date-part name="month" form="short" suffix=" "/>
<date-part name="day" form="numeric-leading-zeros" suffix=", "/>
<date-part name="year"/>
</date>
<terms>
<term name="chapter" form="short">ch.</term>
<term name="presented at">presented at the</term>
Expand Down Expand Up @@ -65,17 +70,22 @@
<date-part name="year" form="long"/>
</date>
</if>
<else-if type="bill book chapter graphic legal_case legislation motion_picture paper-conference song thesis" match="any">
<else-if type="bill book chapter graphic legal_case legislation song thesis" match="any">
<date variable="issued">
<date-part name="year" form="long"/>
</date>
</else-if>
<else>
<else-if type="paper-conference" match="any">
<date variable="issued">
<date-part name="day" form="numeric-leading-zeros" suffix="-"/>
<date-part name="month" form="short" suffix="-" strip-periods="true"/>
<date-part name="year" form="long"/>
<date-part name="month" form="short"/>
<date-part name="year" prefix=" "/>
</date>
</else-if>
<else-if type="motion_picture" match="any">
<date variable="issued" form="text" prefix="(" suffix=")"/>
</else-if>
<else>
<date variable="issued" form="text"/>
</else>
</choose>
</macro>
Expand Down Expand Up @@ -177,11 +187,7 @@
</group>
<group prefix="[" suffix="]" delimiter=": ">
<text term="accessed" text-case="capitalize-first"/>
<date variable="accessed">
<date-part name="day" form="numeric-leading-zeros" suffix="-"/>
<date-part name="month" form="short" suffix="-" strip-periods="true"/>
<date-part name="year" form="long"/>
</date>
<date variable="accessed" form="text"/>
</group>
</group>
</if>
Expand Down
23 changes: 8 additions & 15 deletions ieee.csl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
</info>
<locale xml:lang="en">
<date form="text">
<date-part name="month" form="short" suffix=" "/>
<date-part name="day" form="numeric-leading-zeros" suffix=", "/>
<date-part name="year"/>
</date>
<terms>
<term name="chapter" form="short">ch.</term>
<term name="presented at">presented at the</term>
Expand Down Expand Up @@ -100,18 +105,10 @@
</date>
</else-if>
<else-if type="motion_picture" match="any">
<date variable="issued" prefix="(" suffix=")">
<date-part name="month" form="short" suffix=" "/>
<date-part name="day" form="numeric-leading-zeros" suffix=", "/>
<date-part name="year"/>
</date>
<date variable="issued" form="text" prefix="(" suffix=")"/>
</else-if>
<else>
<date variable="issued">
<date-part name="month" form="short" suffix=" "/>
<date-part name="day" form="numeric-leading-zeros" suffix=", "/>
<date-part name="year"/>
</date>
<date variable="issued" form="text"/>
</else>
</choose>
</macro>
Expand Down Expand Up @@ -233,11 +230,7 @@
<!-- Accessed: Mon. DD, YYYY. -->
<group delimiter=": ">
<text term="accessed" text-case="capitalize-first"/>
<date variable="accessed">
<date-part name="month" form="short" suffix=" "/>
<date-part name="day" form="numeric-leading-zeros" suffix=", "/>
<date-part name="year"/>
</date>
<date variable="accessed" form="text"/>
</group>
<!-- [Online Video]. -->
<group prefix="[" suffix="]" delimiter=" ">
Expand Down

0 comments on commit 070586b

Please sign in to comment.