commented on 2009-12-07
commentato il 07-12-2009
%d-%m-%Y
Posted By: maccio...Sun Mon Tue Wed Thu Fri Sat
$title = str_replace("January", "it jan", $title);
...
$title = str_replace("December", "it dez", $title);
Please use your month names for "it jan" and so on...
The next add a new line after line 40 and insert this:
$italian_days = array (
'it mo',
...
'it so'
);
And change this line from
foreach($day_names as $d)
to this
foreach($italian_days as $d)
If you want to change the chars (two instead of three like "mo" instead of "mon"), change from
$calendar .= ''.htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d).' ';
to this
$calendar .= ''.htmlentities($day_name_length < 4 ? substr($d,0,2) : $d).' ';
Replace the "$day_name_length" with "2" or "3". It works for my german calendar fine.
for($n=0,$t=(3+$first_day)*86400; $n<7; $n++,$t+=86400) #January 4, 1970 was a Sunday
changed to
for($n=0,$t=(4+$first_day)*86400; $n<7; $n++,$t+=86400) #January 4, 1970 was a Sunday
and in line 29 from
$weekday = ($weekday + 7 - $first_day) % 7; #adjust for $first_day
changed to
$weekday = ($weekday + 6 - $first_day) % 7; #adjust for $first_day
I tried 3 years to test and it works. Monday is the first weekday and Sunday the last, like my working week :)
And I do a little more, so I have a red box around the current day in current monh and see which day is today. But this I can'T post here, because I do add many "beginner hacks" in many lines to get it working in this plugin. It looks like you're new here. If you want to get involved, click one of these buttons!