Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Data Model Questions

issue with date.php


Reply

3 Posts   1079 Views

Avatar
J2-Paul

23 May 2010 at 6:42am Community Member, 51 Posts

The Day() method is not working for me.

I am working with Tutorial 2. This code below from my template

Posted on Long: $Date.Long by $Author<br>
   Posted on ShortMonth: $Date.ShortMonth by $Author<br>
   Posted on URLDate: $Date.URLDate by $Author<br>
   Posted on Year: $Date.Year by $Author<br>
   Posted on Month: $Date.Month by $Author<br>
   Posted on Day: $Date.Day by $Author<br>
   Posted on Nice: $Date.Nice by $Author<br>

Outputs

Posted on Long: 1 January 2010 by Paul West
Posted on ShortMonth: Jan by Paul West
Posted on URLDate: 2010-01-01 by Paul West
Posted on Year: 2010 by Paul West
Posted on Month: by Paul West
Posted on Day: Friday by Paul West
Posted on Nice: 01/01/2010 by Paul West

Note the Month: >>>> there is not month!

Avatar
Willr

23 May 2010 at 2:29pm (Last edited: 23 May 2010 2:30pm), Forum Moderator, 5511 Posts

$Date.Month was not part of the date API till last week (will be part of 2.4.1). For older versions you either use $Date.ShortMonth or use $Date.Format(F) to get the full month.

Avatar
J2-Paul

25 May 2010 at 12:30am Community Member, 51 Posts

Thanks Will. I guess I should have figured this out myself. New to SS, and development on this level, so please bear with me!