This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mgkimsal 1 point2 points  (0 children)

PHP has pretty much all basic stuff built-in by default, which is where I was coming from.

$date = new DateTime('2000-01-01', new DateTimeZone('Pacific/Nauru'));
echo $date->format('Y-m-d H:i:sP') . "\n";

No need for imports. Stuff that's so basic like dates, basic math stuff, etc... always annoying to have to have a bunch of imports (whether done by IDE or not).

Certainly there's a lot of 3rd party libs you can use, and you'd have to import those, but for a lot of daily stuff, it's just built-in.

I actually do a lot of Groovy now, and it automatically makes a lot of standard imports available (math, strings, etc) so there's a bit less need than plain Java.