From: Martin H. E. <ma...@ha...> - 2003-04-08 16:07:56
|
Hello everybody I do not think that the date and time tags in the template should be done in the suggested way, because different countries, have different ways in presenting the date. And there is alse the problem about showing the 24 hour clock or the 12 our clock, and what if the person making the layout, want a special way. The way I have done it, was taking all the different date possibilities in the php date function, and put them in the Layout class file like this: $THEME["MONTH_NUM_LONG"] = date("m"); $THEME["MONTH_NUM_SHORT"] = date("n"); $THEME["MONTH_DAY_LONG"] = date("d"); $THEME["MONTH_DAY_SHORT"] = date("j"); $THEME["MONTH_NAME_LONG"] = $_SESSION["translate"]->it(date("F")); $THEME["MONTH_NAME_SHORT"] = $_SESSION["translate"]->it(date("M")); $THEME["WEEKDAY_LONG"] = $_SESSION["translate"]->it(date("l")); $THEME["WEEKDAY_SHORT"] = $_SESSION["translate"]->it(date("D")); $THEME["YEAR_LONG"] = date("Y"); $THEME["YEAR_SHORT"] = date("y"); $THEME["SWATCH_TIME"] = date("B"); $THEME["HOUR_24_LONG"] = date("H"); $THEME["HOUR_24_SHORT"] = date("G"); $THEME["HOUR_12_LONG"] = date("h"); $THEME["HOUR_12_SHORT"] = date("g"); $THEME["HOUR_12_FIX"] = $_SESSION["translate"]->it(date("a")); // Probably needs another name $THEME["MINUTE"] = date("i"); $THEME["SECOND"] = date("s"); As you can see, I have also made the appropiate midifications in the english language files. mvh Martin Hjort Eriksen ------------------------------------ Studenterrådet, Roskilde Universitetscenter ------------------------------------ Hulgårdsvej 143, 2. tv 2400 København NV +45 26 80 21 29 ------------------------------------ |