2 ms·
I'm never sure what to make of posts like this. Sure, it is a short code snippet that works some of the time, but the original was trying to solve a more diffi
by DougBTX 18y ago
I'm never sure what to make of posts like this.
Sure, it is a short code snippet that works some of the time, but the original was trying to solve a more difficult problem. This code doesn't even try.
What good is pretty code if it only runs on localhost?
Oh, and if you really do only care about localhost, there isn't much difference between the Sinatra/Ruby code and PHP:
<?php $date = getdate(); ?>
<html><body>
<h1><?php echo $date[mday] == 25 && $date[mon] == 12 ? "YES" : "NO" ?></h1>
</body></html>
- petercooper 18y agoIf you stuck to just UTC, you could run it anywhere and it'd be logically (though not pragmatically) correct. In any case, I was being flippant because I thought the original was a joke of sorts. It was amusingly overengineered, so I thought I'd go too far in the opposite direction to play devil's advocate, as it were.