Show'Hode content depending on time - Hours & minutes

Thanks to the wonderful Ray Paseur I have a script working which hides content if it's after one o'clock.

 <?php if (date('H') < 13) : ?>

What I need to do now is change this to 1.30. Any ideas how i would change the code below to do this?

I've tried  <?php if (date('H') < 13.30) : ?> & <?php if (date('H') < 13.5) : ?> with no joy...
BrighteyesDesignAsked:
Who is Participating?
 
Robert SaylorConnect With a Mentor Senior DeveloperCommented:
try H.i instead of H
0
 
TvMptCommented:
$x = date('G.i') ;
if ($x < 13.5) {
 // do something
}

Open in new window

0
 
Ray PaseurCommented:
Try this... untested but probably OK in principle.

<?php if (date('H:i') < '13:30') : ?>

Ref: http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_201-Handling-date-and-time-in-PHP-and-MySQL.html
0
All Courses

From novice to tech pro — start learning today.