Hi all,

I've been doing some work on the datetime extension, and while I'm ready to commit I'm a little unsure about somethings (mainly PEAR CS). If someone could verify the following questions that would be great.

Firstly throughout the DateTime methods we can use procedural or object-oriented style. MySQLi is similar and has &mysqli.link.description; for the link parameter which is used in the procedural style only. Should I add something similar for these DateTime methods (AFAICT I need to add to /en/language-snippets.ent)?

Secondly, for PEAR CS I couldn't find anything regarding functions concetenated into a string. Which out of these is closest matched to PEAR?

echo "Day 10 of week 2 of 2008 is the " . $datetime->format('jS') . " of " . $datetime->format('F') . ".\n"; echo "Day 10 of week 2 of 2008 is the {$datetime->format('jS')} of {$datetime->format('F')}.\n";

Also, which of these is most acceptable?

echo $datetime->getTimezone()->getName() . "\n";

$tz = $datetime->getTimezone();
echo $tz->getName() . "\n";

Thanks,
Ross

Reply via email to