File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ body { margin: 0; }
5858 html , body {height : 100% }
5959}
6060
61- cxx-docnum { string-set : docnum content (); }
6261* / deep/ .docname { string-set : docname content (); }
6362* / deep/ .pubyear { string-set : pubyear content (); }
6463
Original file line number Diff line number Diff line change 6868 < template if ="{{docnum}} ">
6969 < tr > < th > Document Number:</ th > < td > < content select ="cxx-docnum "> </ content > </ td > </ tr >
7070 </ template >
71- < template if ="{{pubdate }} ">
72- < tr > < th > Date:</ th > < td > < content select =" time[pubdate] " > </ content > </ td > </ tr >
71+ < template if ="{{hasPubdate }} ">
72+ < tr > < th > Date:</ th > < td > < time pubdate > < span class =" pubyear " > {{pubyear}} </ span > -{{pubmonth}}-{{pubday}} </ time > </ td > </ tr >
7373 </ template >
7474 < template if ="{{revises}} ">
7575 < tr > < th > Revises:</ th > < td > < content select ="cxx-revises "> </ content > </ td > </ tr >
@@ -93,7 +93,7 @@ <h1>Working Draft, {{title}}</h1>
9393 < div class ="header ">
9494 < template if ="{{stage == 'pdts' || stage == 'dts'}} ">
9595 < strong > ISO/IEC JTC1 SC22 WG21 < content select ="cxx-docnum "/> </ content> </ strong> < br />
96- Date: < content select =" time[pubdate] " > </ content > < br />
96+ Date: < time pubdate > < span class =" pubyear " > {{pubyear}} </ span > -{{pubmonth}}-{{pubday}} </ time > < br />
9797 < template if ="{{stage == 'pdts'}} ">
9898 ISO/IEC PDTS < content select ="cxx-project-number "> </ content > < br />
9999 </ template >
@@ -178,7 +178,7 @@ <h2>Langages de programmation — {{title_fr}}</h2>
178178 <!-- Find your project number at https://isocpp.org/std/status. -->
179179 < template > < content > </ content > </ template >
180180</ polymer-element >
181- < polymer-element name ="cxx-docnum " noscript >
181+ < polymer-element name ="cxx-docnum " noscript class =" docname " >
182182 < template > < content > </ content > </ template >
183183</ polymer-element >
184184< polymer-element name ="cxx-editor " noscript >
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ limitations under the License.
1818 // Default properties
1919 projectNumber : null ,
2020 docnum : null ,
21- pubdate : null ,
21+ hasPubdate : false ,
2222 editor : null ,
2323 revises : null ,
2424 title : null ,
@@ -65,8 +65,14 @@ limitations under the License.
6565 domReady : function ( ) {
6666 this . projectNumber = this . querySelector ( 'cxx-project-number' ) ;
6767 this . docnum = this . querySelector ( 'cxx-docnum' ) ;
68- this . pubdate = this . querySelector ( 'time[pubdate]' ) ;
69- this . pubyear = new Date ( this . pubdate . textContent . split ( '-' ) ) . getFullYear ( ) ;
68+ var pubdateElem = this . querySelector ( 'time[pubdate]' ) ;
69+ this . hasPubdate = ! ! pubdateElem ;
70+ if ( pubdateElem ) {
71+ var pubdate = pubdateElem . textContent . split ( '-' ) ;
72+ this . pubyear = pubdate [ 0 ] ;
73+ this . pubmonth = pubdate [ 1 ] ;
74+ this . pubday = pubdate [ 2 ] ;
75+ }
7076 this . editor = this . querySelector ( 'cxx-editor' ) ;
7177 this . revises = this . querySelector ( 'cxx-revises' ) ;
7278
You can’t perform that action at this time.
0 commit comments