All pastes #556524 Raw Edit

Miscellany

public php v1 · immutable
·published 2007-06-10 16:54 UTC
rendered paste body
$node->field_lessondate = Array (                                   0 => Array (                                                 "value" => "2007-06-10T11:00:00" ,                                                "view"=> "Sunday, 10 June 2007"                                              )                                );print_r($node->field_lessondate);if ($node->field_lessondate[0]['value']) {	$monthdayyear = explode("-", substr($node->field_lessondate[0]['value'], 0, 10));	$time = explode(":", substr($node->field_lessondate[0]['value'], 11));        	$date = mktime($time[0], $time[2], $time[1], $monthdayyear[1], $monthdayyear[2], $monthdayyear[0]);	$time = time();	if ($date >= $time ) {          $upcoming = TRUE;           print 'upcoming lesson';	}	else {          $upcoming = FALSE;          print 'no upcoming lesson';		}}  else {   $date = $node->created;	}