Jump to content

[SOLVED] date problem


DJTim666

Recommended Posts

Am I stupid, or what?

 

<?php
$date = date("d", $status['created'])==date("d", time())?"Today at ".date("h:i:s A"):(date("d", $status['created'])+1)==date("d", time())?"Yesterday at ".date("h:i:s A", $status['created']):date("d/m/y h:i:s A", $status['created']);
?>

 

It won't say anything but "Yesterday at [date here]". Even though the status its going over was created today.

 

PLEASE HELP!!!

Link to comment
https://forums.phpfreaks.com/topic/174620-solved-date-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.