Help - Search - Members - Calendar
Full Version: date format
Movable Type Community Forum > Additional Resources > Tips and Tricks
Joe
I have weekly archives set up and displayed on my main index page and the date links are displayed in long format (i.e. "October 20, 2002 - October 26, 2002") I want to change them to short format (i.e. "Oct 20, 2002 - Oct 26, 2002"). I did find a reference to date tags in the docs, but I am not sure how/where to place them to achieve this. Can someone give me guidance on this? Kristine? Girlie? I'm sure either of you know how to do this. =)

TIA
maddy
I assume you are using something like this to display your archive links?
CODE
<MTArchiveList archive_type="Weekly">
<a href="<MTArchiveLink>"><MTArchiveTitle></a><br />
</MTArchiveList>
All you need to do is replace MTArchiveTitle with MTArchiveDate-MTArchiveDateEnd, using whichever of those date format tags you found to give you the format you want! biggrin.gif So, to get the style you mentioned, you'd want
CODE
<MTArchiveList archive_type="Weekly">
<a href="<MTArchiveLink>"><MTArchiveDate format="%b %d, %Y"> - <MTArchiveDateEnd format="%b %d, %Y"></a><br />
</MTArchiveList>
Oh, if Weekly archives are your preferred type, you obviously don't need to include the archive_type="Weekly" bit. smile.gif

I hope that helps! smile.gif
Joe
Thanks maddy! =)

This is exactly what I needed. I just needed a little help with placing it properly.

Thanks again.
maddy
Glad to be of assistance! I'm sure Girlie and Kristine are snoozing as we type! smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.