Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

php date format - today, yesterday, etc...

Options
  • 28-06-2010 6:55pm
    #1
    Closed Accounts Posts: 121 ✭✭


    Im using drupal and I want to display 'Today 12.14pm' or 'Yesterday 3.14am' on various content items instead of '26/06/2010 5.12pm' if they were created today or yesterday. Is there a php date function that can return a date (timestamp) formatted as today or yesterday? If not would I go about it?

    EDIT: nvm got it sorted


Advertisement