CSL Month / Date Month

edited 28 days ago
Hey, I rewrote an APA-code, so it suits for my University.

I have one Problem left: I need a way to get the following:
If there is a date with month:
Muster, M. (1996, 21. Mai). Titel Magazinartikel. Publikation, S. 12-13.
If there is only a month:
Muster, M. (1996, Mai). Titel Magazinartikel. Publikation, S. 12-13.

The first one is correct, with the second one I get:
Muster, M. (1996. Mai). Titel Magazinartikel. Publikation, S. 12-13.

I know I need to tell the Programm: if there is no date -> do this
But I'm no programmer, so I and 100 other students would be super happy for your help :)

This is my code:
  • edited 28 days ago
    Sry, it was not displayed as desired…
    All lines that stop with >, begin with <

    macro name="issued">
    choose>
    if type="bill legal_case legislation" match="any"/>
    else-if variable="issued">
    group>
    date variable="issued">
    date-part name="year"/>
    /date>
    text variable="year-suffix"/>
    choose>
    if type="article article-magazine article-newspaper broadcast interview pamphlet personal_communication post post-weblog treaty webpage" match="any">
    date variable="issued">
    date-part prefix=", " name="day"/>
    date-part prefix=". " name="month"/>
    /date>
    /if>
    !-- Only year: article-journal chapter entry entry-dictionary entry-encyclopedia dataset figure graphic motion_picture manuscript map musical_score paper-conference patent report review review-book song speech thesis -->
    /choose>
    /group>
    /else-if>
    else-if variable="status">
    group>
    text variable="status" text-case="lowercase"/>
    text variable="year-suffix" prefix="-"/>
    /group>
    /else-if>
    else>
    group>
    text term="no date" form="short"/>
    text variable="year-suffix" prefix="-"/>
    /group>
    /else>
    /choose>
    /macro>
  • Or is there a citation-style that already works this way? So I could include the code
  • The conditional to print "no date" or the "date" would look like this in it's minimal form:

    <macro name="date">
    <choose>
    <if match="any" is-uncertain-date="issued">
    <text term="no date"/>
    </if>
    <else>
    <date variable="issued">
    <date-part name="year"/>
    </date>
    </else>
    </choose>
    </macro>


    Adapt as necessary.
Sign In or Register to comment.