hola chicos!! bueno viendo la pagina de macromedia devep. me encontre un ejemplo de como hacer un blog.
 
este blog tiene un calendario y os expongo exactamente cual es el codigo del calendario: 
Archivo: connBlog (se ubica en la carpeta Connections): 
 Código PHP:
    <?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_connBlog = "remus.iakt.ro";
$database_connBlog = "mza_blog";
$username_connBlog = "root";
$password_connBlog = "insfarsit";
$connBlog = mysql_pconnect($hostname_connBlog, $username_connBlog, $password_connBlog) or trigger_error(mysql_error(),E_USER_ERROR); 
?>    
  esto configurarlo como vuestro servidor  
 Código PHP:
    <?php require_once('Connections/connBlog.php'); ?>
<?php
mysql_select_db($database_connBlog, $connBlog);
$query_rsArticleDates = "SELECT date_format(date_art, '%Y-%c-%e') as ArticleDate FROM blg_article_art";
$rsArticleDates = mysql_query($query_rsArticleDates, $connBlog) or die(mysql_error());
$row_rsArticleDates = mysql_fetch_assoc($rsArticleDates);
$totalRows_rsArticleDates = mysql_num_rows($rsArticleDates);
 
?>
 
        <?php 
            function build_calendar($month,$year,$day) {
                /* Declaring the variables */
                $daysOfWeek = array('D','L','M','M','J','V','S');
                $firstDayOfMonth = mktime(0,0,0,$month,1,$year);
                $noDays = date('t',$firstDayOfMonth);
                $dateComponents = getdate($firstDayOfMonth);
                $dayOfWeek = $dateComponents['wday'];
                $monthName = date('F',mktime(0,0,0,$month,1,$year));
                
                global $rsArticleDates;
                global $_GET;
                
                if (mysql_num_rows($rsArticleDates) > 0){
                    mysql_data_seek($rsArticleDates,0);
                    while($row_rsArticleDates = mysql_fetch_assoc($rsArticleDates)){
                        $dates[] = $row_rsArticleDates['ArticleDate'];
                    }
                }
    
                /* Computing the previous month. */
                if($month == 1) {
                     $mn=12;
                     $yn=$year-1;
                 } else {
                         $mn=$month-1;
                         $yn=$year;
                }
                
                /* Computing the next month. */
                if($month == 12) {
                    $mn2=1;
                    $yn2=$year+1;
                } else {
                    $mn2=$month+1;
                    $yn2=$year;
                }
                
                /* Calendar header: next and previous month links */
                $calendar = "<table>";
                $calendar .= "<tr><td><a href=index.php?m=$mn&y=$yn&d=$day><</a></td>";
                $calendar .="<td colspan=5 align=center>$monthName, $year</td>";
                $calendar .="<td><a href=index.php?m=$mn2&y=$yn2&d=$day>></a></td></tr>";
                $calendar .="<tr>";         
                
                /* Calendar header: Display the days of the week */
                foreach($daysOfWeek as $day) { 
                      $calendar .= "<td>$day</td>"; 
                } 
                $calendar .= "</tr>"; 
                $calendar .= "<tr>"; 
 
              $currentDay = 1;
             
 
              /* Fill in the beginning of the calendar    body */    
              if ($dayOfWeek > 0) {  
                 $calendar .= "<td  colspan='$dayOfWeek'> </td>";  
              } 
            
              /* Generate the calendar body */        
              while ($currentDay <= $noDays) { 
                    if ($dayOfWeek == 7) { 
                       $dayOfWeek = 0; 
                       $calendar .= "</tr><tr>"; 
                    } 
                    $date = $year."-".$month."-".$currentDay;
                    if (in_array($date,$dates)) { 
                        $calendar .= "<td><a href='index.php?m=$month&y=$year&d=$currentDay'>$currentDay</a></td>"; 
                    } else {
                        $calendar .= "<td>$currentDay</td>";
                    }
                   $currentDay++; 
                   $dayOfWeek++; 
              } 
 
            /* Filling in the end of the calendar body */
            if ($dayOfWeek != 7) {  
                  $remainingDays = 7 - $dayOfWeek; 
                  $calendar .= "<td colspan='$remainingDays'> </td>";  
            } 
  
              $calendar .= "</table>"; 
            return $calendar;
} 
if (isset($_GET['m']) && isset($_GET['y']) && isset($_GET['d'])){     
    $month = $_GET['m'];
    $year = $_GET['y'];
    $day = $_GET['d'];
} else {
    $dateComponents = getdate();
    $month = $dateComponents['mon'];
    $year = $dateComponents['year'];
    $day = $dateComponents['mday'];
}
 
echo build_calendar($month,$year,$day);
 
        ?>
        <?php
mysql_free_result($rsArticleDates);
?>    
  y la base de datos: 
 Código PHP:
    -- phpMyAdmin SQL Dump
-- version 2.6.4-pl3
-- http://www.phpmyadmin.net
-- 
-- Servidor: localhost
-- Tiempo de generación: 06-01-2006 a las 00:36:01
-- Versión del servidor: 5.0.15
-- Versión de PHP: 5.0.5
-- 
-- Base de datos: `bands`
-- 
 
-- --------------------------------------------------------
 
-- 
-- Estructura de tabla para la tabla `blg_article_art`
-- 
 
CREATE TABLE `blg_article_art` (
  `id_art` int(11) NOT NULL auto_increment,
  `idtop_art` int(11) NOT NULL default '0',
  `title_art` varchar(100) NOT NULL default '',
  `description_art` varchar(255) NOT NULL default '',
  `text_art` longtext NOT NULL,
  `date_art` datetime default NULL,
  PRIMARY KEY  (`id_art`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
 
-- 
-- Volcar la base de datos para la tabla `blg_article_art`
-- 
 
INSERT INTO `blg_article_art` VALUES (1, 0, '', '', '', '2006-01-10 22:49:38'); 
    
  viene con un ejemplo simple, tampoco me he explayado metiendo contenido pues como es para ver el ejemplo... 
bueno siguiendo esto, sabeis que los americanos o ingleses empiezan la semana desde el domingo y el dia se retrasa arriba al calendario pero aki es diferente.. le he dado vueltas a esto y no he tenido narices de hacerlo bien. 
hice el siguiente cambio:  
 Código PHP:
    $firstDayOfMonth = mktime(0,0,0,$month,1,$year); 
    
  y lo cambie por:  
 Código PHP:
    $firstDayOfMonth = mktime(0,-1,0,$month,1,$year); 
    
  y  
 Código PHP:
    $daysOfWeek = array('D','L','M','M','J','V','S'); 
    
  por:  
 Código PHP:
    $daysOfWeek = array('L','M','M','J','V','S','D'); 
    
  
asi el calendario si funciona, peeeeeeeeeero al llegar al mes de abril, acaba el mes en 31 (lunes), pero al pasar al mes de mayo empieza tb la semana en 1 (lunes) y esto no me cuadra. 
donde falla esto?? 
un saludo.