Help - Search - Members - Calendar
Full Version: Date Format in Comment Dates
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
btrott
I assume that you are using the MT date tag in an MT template, yes?

Could you please post the tag that you are using here? (Using the "Code" button)
btrott
The '$' goes at the end of the tag, not at the end of the name of the tag. In other words it should look like this:

CODE
<$MTCommentDate format="%b %e, %Y %I:%M %p"$>
FalseIdol
I'm having the problem that the date doesn't show up from my MTCommentDate tag in the MT-comments template and it is not reading the format I have specified. This code:
CODE
<MTComments>
<div class="comments-body">
<$MTCommentBody$>
<span class="comments-post">Posted by <$MTCommentAuthorLink$> at <$MTCommentDate format="%I %p %b %e, %Y"$></span>
</div>
</MTComments>

produces a date that looks like:
QUOTE
Posted by Nikki at 12 PM Apr , 2002

Any ideas?

FalseIdol
www.3BitchyChicks.com
FalseIdol
I don't think it is the server not accepting the format attribute, because elsewhere...
CODE
<$MTEntryDate format="%m%d%y"$>

produces
QUOTE
040402

(April 4th, 2002) as it is supposed to.

When I left the tag without the format attribute (just <$MTCommentDate$>) it also produced the same problemmatic results detailed above.
quadsk8
Not a bug just a typo:

I use Dutch language and %A for Wednesday gives me Woensag this should be Woensdag (like it should not read Wednesay in english  :)

Will try to hack it myself  :0

but maybe for next release?
quadsk8
Thank you for the reply!!

I have another suggestion if I may...

In your standard templates (which I still use, so put in the paid links!) you use a XHTML 1.0 transitional doctype.

According to an article on A List Apart on DOCTYPES the used relative link
CODE
"DTD/xhtml1-transitional.dtd"
should be a complete URI:
CODE
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
.

Sorry to be a wise...  :0

but maybe also for next release templates?
akalsey
In the various comment date tags, the date formatting attribues don't seem to work. The MT tag is sent to the browser instead of the correct date.
akalsey
This is in the comment templates:
CODE
   <MTComments>

   <$MTCommentBody$>

<div class="blogbyline">Posted by <$MTCommentAuthorLink$> | <$MTCommentDate$ format="%b %e, %Y %I:%M %p"></div>

   </MTComments>


Win2k, IIS 5, MT 1.4
akalsey
Duh. Of course.
bmk
I think that I remember reading here that not all of the format specifiers work on every server (because the server is not set up for it), and since it looks like you have everything written correctly smile.gif, I'm guessing that's what is going on here.  Does %d work instead of %e?

Brenna
btrott
FalseIdol: Brenna is saying not that the format attribute is not being picked up, but that the %e specifier that you are using isn't working--which is likely, because that specifier does not work on every server. So you should use %d instead of %e.

BTW, I assume you are using 1.4 or lower? Because %e will always work in 2.0.
FalseIdol
Yep, %d was it. And, yes, you caught me. I've been so happy with the way v1.4 has been working, I've been hesitant to go through the process of upgrading. Guess I'll do it anyway.

Thanks to both of you for helping out so quickly!
btrott
Thanks! Will be fixed for the next release.
btrott
Yep, we will fix this too. Thanks!
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-2008 Invision Power Services, Inc.