Add MACRO to get ordinal year of the new year show
Calculate the ordinal value of difference between the current year and 2011 (the first year of the New Year Show)
This commit is contained in:
@@ -141,7 +141,7 @@
|
||||
<!--% start_year = start_year - 1 %-->
|
||||
<!--% END %-->
|
||||
<time datetime="<!--% start_year %-->-12-31T10:00Z"><!--% start_year %-->-12-31 10:00 UTC (5:00 AM EST)</time>
|
||||
<!--% END %-->
|
||||
<!--% END %-->
|
||||
|
||||
<!--% MACRO get_new_year_show_end BLOCK %-->
|
||||
<!--% end_year = date.format(date.now, '%Y') %-->
|
||||
@@ -151,3 +151,17 @@
|
||||
<time datetime="<!--% end_year %-->-01-01T12:00Z"><!--% end_year %-->-01-01 12:00 UTC (7:00 AM EST)</time>
|
||||
<!--% END %-->
|
||||
|
||||
<!--% MACRO get_new_year_show_ordinal_year BLOCK %-->
|
||||
<!--% ordinal_year = date.format(date.now, '%Y') - 2011 %-->
|
||||
<!--% IF date.format(date.now, '%m') != 12 || date.format(date.now, '%j') == 1 %-->
|
||||
<!--% ordinal_year = ordinal_year - 1 %-->
|
||||
<!--% END %-->
|
||||
<!--% years.14 = 'Fourteenth'
|
||||
years.15 = 'Fifteenth'
|
||||
years.16 = 'Sixteenth'
|
||||
years.17 = 'Seventeenth'
|
||||
years.18 = 'Eighteenth'
|
||||
years.19 = 'Nineteenth'
|
||||
years.20 = 'Twentieth' %-->
|
||||
<!--% years.$ordinal_year %-->
|
||||
<!--% END %-->
|
||||
|
||||
Reference in New Issue
Block a user