Test for month or day in date
Back in 2011 and 2014 there was a discussion on this issue. Have there been any changes? (https://forums.zotero.org/discussion/11912/test-if-issued-date-contains-month-and-day)
I need to be able to style a date so that it will only show if the issued date contains a month or a day. In other words I want to suppress the date if all we have is a year. We need a year as the second field of the reference and then the full issued date at the end. But if its just a year, we do not want it again. Is there any way to achieve this in the latest CSL? Ideally I need to be able to put a datepart into an If statement. Otherwise any suggestions for workarounds will be most welcome.
We are not using a published style. I made one from scratch and this is something I can not figure out. I can make some unused field available to indicate a "Suppress date" but would then have to get this into many thousands of records across multiple document types.
Thank you
I need to be able to style a date so that it will only show if the issued date contains a month or a day. In other words I want to suppress the date if all we have is a year. We need a year as the second field of the reference and then the full issued date at the end. But if its just a year, we do not want it again. Is there any way to achieve this in the latest CSL? Ideally I need to be able to put a datepart into an If statement. Otherwise any suggestions for workarounds will be most welcome.
We are not using a published style. I made one from scratch and this is something I can not figure out. I can make some unused field available to indicate a "Suppress date" but would then have to get this into many thousands of records across multiple document types.
Thank you
Clark, Melissa. 2012. “Cabbage Flexes Its Brawn Three Ways.” The New York Times, March 9, 2012, sec. Dining & Wine. http://www.nytimes.com/2012/03/14/dining/cabbage-flexes-its-brawn-three-ways.html.
But if you only have 2012 in the date field, Zotero gives you
Clark, Melissa. 2012. “Cabbage Flexes Its Brawn Three Ways.” The New York Times, 2012, sec. Dining & Wine. http://www.nytimes.com/2012/03/14/dining/cabbage-flexes-its-brawn-three-ways.html.
which makes no sense; you don't need the date twice.