My question is in three parts:
(1) I've found
various scripts which allow you to count-up from a particular date, but they display the result in seconds, hours, minutes, years etc. I'd like to show the result in just years and don't need a bloated script.
A couple of scripts that I've found are:
http://javascript.internet.com/clocks/days-old.html
http://www.javascriptkit.com/script/.../countup.shtml
(2) The reason I need a count-up feature is so that I can show how old a film festival is on my movie site (e.g. "the 52nd Sydney Film Festival"). Is there a way of incorporating the "nd", "th" etc. to the above results please?
(3) Finally, is there any way of incorporating the above script inside another script?
I'm currently using another javascript to link to a different page each month, with info. about the film festival taking place that month.
The script is this one:
Code:
<!------------------------------- FILM FESTIVALS ------------------------------------->
<SCRIPT language=JavaScript>
<!-- Begin
var months=new Array(13);
months[1]="The festival year kicks of with Sundance, or \"Cannes in the snow\" as some have come to describe it. If you can't make it to Utah, read out it at UKHotMovies.com here";
months[2]="Read about this February\'s Berlin Film Festival in our new film festivals section <A HREF=\"/film-festivals/berlin-film-festival\">here</A>.";
months[3]="New! Find out more about this month\'s Amnesty International Film Festival (Amsterdam) <A HREF=\"/festival/Amnesty\">here</A>";
months[4]="Read about this month\'s Tribeca Film Festival in our new film festivals section <A HREF=\"/film-festivals/tribeca-film-festival\">here</A>.";
months[5]="Read about this May\'s Cannes Film Festival in our new film festivals section <A HREF=\"/film-festivals/cannes-film-festival\">here</A>.";
months[6]="Read about this June\'s Sydney Film Festival in our new film festivals section <A HREF=\"/film-festivals/sydney-film-festival\">here</A>.";
months[7]="Cambridge Film Festival July";
months[8]="Edinburgh International Film Festival August";
months[9]="Venice Film Festival September";
months[10]="Edmonton International Film Festival October";
months[11]="Los Angeles Int’l Film Festival November";
months[12]="Cairo International Film Festival - December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
document.write(" " + lmonth + " ");
// End -->
</SCRIPT>
<!------------------------------- FILM FESTIVALS ------------------------------------->
You can see it in action towards the bottom of
this page.
What I'd basically like to do is that instead of it saying "read about the Edmonton Film Festival taking place this October", say "read about the
15th Edmonton Film Festival taking place this October".
Thanks a million. Spent a while trying to solve the conundrum myself, but my Javascript skills are limited.