2 Replies Latest reply on May 25, 2009 5:14 PM by david.salter

    convertDateTime Masks

      The documentation for s:convertDateTime is incomplete. Is there someplace that has a listing of the date masks?


      I'm trying to get the full day text (Wednesday) to display. I've tried d, dd, ddd, ddd, D, DD, DDD and DDDD and they don't work.





      33.1.2.1. <s:convertDateTime>
      
      Description
      
      Perform date or time conversions in the Seam timezone.
      
      Attributes
      
      None.
      
      Usage
      
      
      <h:outputText value="#{item.orderDate}">
      
         <s:convertDateTime type="both" dateStyle="full"/>
      
      </h:outputText>





        • 1. Re: convertDateTime Masks
          david.salter

          You need to use the pattern attribute to give you this type of formatting.  You can then use the E attribute to print out the day.


          e.g.




          <h:outputText value="#{item.dueDate}">
             <s:convertDateTime pattern="E d MMM" />
          </h:outputText>





          Would print out (for example):


          Wed 27 May

          • 2. Re: convertDateTime Masks
            david.salter

            Plus, if you want the full day (Wednesday) instead of the shortened version (Wed), you would need to replace E with EEEE.