I am trying to extend the sfDate ()  plugin  for a project.

After a great email tip from the original author, I have:
class myDate
{

 public static function getWeeksOfMonth($ts = null)
 {

        if ($ts === null) $ts = sfDateTimeToolkit::now();

  $dt = sfDate::getInstance()->subtractMonth()->finalDayOfMonth()-
>addWeek()->firstDayOfWeek($ts);
  $base = sfDate::getInstance()->finalDayOfMonth($ts);
  $ar = array();
  while ($dt->cmp($base) < 0)
  {
    $ar[] = $dt->get();
    $dt->addWeek();
  }

  return $ar;
 }

}

my problem is that I cant get it to recognize $ts, and thus  only does
current month.

any ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to