Answers.Body: <pre><code>{% switch entry.postDate|date('M') %}
  
      {% case 'Dec' or 'Jan' or 'Feb' %}
          {% set season = 'Winter' %}
  
      {% case 'Mar' or 'Apr' or 'May' %}
          {% set season = 'Spring' %}
  
      {% case 'Jun' or 'Jul' or 'Aug' %}
          {% set season = 'Summer' %}
  
      {% case 'Sep' or 'Oct' or 'Nov' %}
          {% set season = 'Fall' %}
  
  {% endswitch %}
  
  &lt;p&gt;{{ season }} {{ entry.postDate|date('Y') }}&lt;/p&gt;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-19T04:39:45.447Z
Answers.Text: That is way simpler than what I would have tried. Thanks!
Answers.UserDisplayName: jasonetco
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-20T08:50:00.263Z
Answers.Text: Wow. Didn't actually know you could have an `or` statement inside a `{% case %}` tag. +1, Lindsey!
Answers.UserDisplayName: Mats Mikkel Rummelhoff
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-20T14:46:01.163Z
Answers.Text: @MatsMikkelRummelhoff: That's a brand new feature as of Craft 2.6!
Answers.UserDisplayName: Lindsey D
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-19T03:32:54.553Z
Answers.LastActivityDate: 2016-03-19T03:32:54.553Z
Answers.UserDisplayName: Lindsey D
Body: <p>I'd like to get an output of <strong>Spring 2015</strong> from a post entry that was written in March. Here is a JavaScript solution</p>
  
  <p><a href="http://jsfiddle.net/RtC58/3/" rel="nofollow">http://jsfiddle.net/RtC58/3/</a></p>
  
  <p>But I'm hoping I can do something in the template instead. Thanks!</p>
  
Tags: <templating>
Title: Output season name from entry date
ThreadText: # Output season name from entry date
  
  (Asked by: username_0 on 2016-03-19)
  
  I'd like to get an output of **Spring 2015** from a post entry that was written in March. Here is a JavaScript solution
  
  <http://jsfiddle.net/RtC58/3/>
  
  But I'm hoping I can do something in the template instead. Thanks!
  
  **Tags:** templating
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-03-19. Score: 5 | Accepted answer
  
  ```
  {% switch entry.postDate|date('M') %}
  
      {% case 'Dec' or 'Jan' or 'Feb' %}
          {% set season = 'Winter' %}
  
      {% case 'Mar' or 'Apr' or 'May' %}
          {% set season = 'Spring' %}
  
      {% case 'Jun' or 'Jul' or 'Aug' %}
          {% set season = 'Summer' %}
  
      {% case 'Sep' or 'Oct' or 'Nov' %}
          {% set season = 'Fall' %}
  
  {% endswitch %}
  
  <p>{{ season }} {{ entry.postDate|date('Y') }}</p>
  
  ```
  
  > **Comments:**
  > **username_0**: That is way simpler than what I would have tried. Thanks!  
  > **username_2**: Wow. Didn't actually know you could have an `or` statement inside a `{% case %}` tag. +1, username_1!  
  > **username_1**: @username_2: That's a brand new feature as of Craft 2.6!  
  
  ---
  
  