Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8026 Posts in 1851 Topics- by 2099 Members - Latest Member: roi
Pages: [1]   Go Down
Print
Author Topic: Customizing date-range display  (Read 304 times)
0 Members and 1 Guest are viewing this topic.
digifish
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: May 13, 2003, 06:01:00 PM »

I've been having fun with the templates -- great flexibility, even for someone with a very basic programming know-how. When using a Week or Two-Week view, I copied from the default template to display the dates numerically, like "5/11/03 - 5/16/03."

However, I'm trying to figure out how to instead make it say "May 11 - May 16, 2003" instead. But, I haven't had any success. Any ideas?

Thanks.

-- Andy

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 221

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: May 13, 2003, 06:25:00 PM »

Try

code:
<%= $RANGE_START_MONTH %> <%= $RANGE_START_DATE %> - <%= $RANGE_END_MONTH %> <%= $RANGE_END_DATE %>, <%= $RANGE_END_YEAR %>

There's a pretty complete listing of the calendar variables available for use in the
CalendarScript Customization Documentation under "Defined Variables".

Dan O.
Unofficial CalendarScript - Mods and Plugins site

[This message has been edited by DanO (edited May 13, 2003).]

Logged
digifish
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: May 14, 2003, 08:50:00 AM »

Yes, I looked at those variables before. However, all I'm able to get for <%= $RANGE_START_MONTH %> is the month number ("5") instead of the name ("May"). Am I missing something?

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 221

Please don't PM me. Post in the open forum.


WWW
« Reply #3 on: May 14, 2003, 12:08:00 PM »

** <%= $RANGE_START_MONTH %> is the month number ("5") **

Then you can try

<%= $MONTH_NAMES->[$RANGE_START_MONTH-1] %>

and

<%= $MONTH_NAMES->[$RANGE_END_MONTH-1] %>

respectively to print the actual month names.

Dan O.


[This message has been edited by DanO (edited May 14, 2003).]

Logged
digifish
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #4 on: May 14, 2003, 02:29:00 PM »

Thanks. That worked fabulously!

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 221

Please don't PM me. Post in the open forum.


WWW
« Reply #5 on: May 14, 2003, 04:11:00 PM »

Glad to hear it, thanks for the follow up.

Dan O.

------------------

Logged
Pages: [1]   Go Up
Print
Jump to: