<?php
	define('mc6397vtDF','Y-m-d');

	function mc6397vt_getToday()
{
        $mc6397vtdate=current_time('Y-m-d');
        return date ($mc6397vtdate);
}

	function mc6397vt_getYesterday()
{
	$mc6397vtnow = current_time('mysql'); 
	$mc6397vtwpTime = strtotime($mc6397vtnow);
	$mc6397vtyest = ($mc6397vtwpTime-86400);
	return date(mc6397vtDF, $mc6397vtyest);
}

	function mc6397vt_getCurrent($mc6397vttype,$mc6397vtdate)
{
	switch($mc6397vttype)
  {
    case 'month':
          switch($mc6397vtdate)
          {
               case 'first':
                    return date(mc6397vtDF, strtotime('first day of this month', current_time('timestamp')));
                    break;
               case 'last':
                    return date(mc6397vtDF, strtotime('last day of this month', current_time('timestamp')));
                  break;
            default:
            return 'unknown';
          }

          break;

    case 'year':
          switch($mc6397vtdate)
          {
              case 'first':
                    return date(mc6397vtDF, strtotime('first day of January this year', current_time('timestamp')));
                    break;
               case 'last':
                    return date(mc6397vtDF, strtotime('last day of December this year', current_time('timestamp')));
                  break; 
            default:
            return 'unknown';
          }

          break;

     default:
         return 'unknown type';
  }
}
	function mc6397vt_getLast($mc6397vttype,$mc6397vtdate)
{
}
