Skip to content

Instantly share code, notes, and snippets.

@turtlix
Created May 13, 2016 00:57
Show Gist options
  • Select an option

  • Save turtlix/fd840e8e3aa8f58a7105b4e99503e93f to your computer and use it in GitHub Desktop.

Select an option

Save turtlix/fd840e8e3aa8f58a7105b4e99503e93f to your computer and use it in GitHub Desktop.

Revisions

  1. turtlix created this gist May 13, 2016.
    13 changes: 13 additions & 0 deletions get_date_position.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    <?php

    if(strtotime(dateString) > time()) {
    # date is in the future
    }

    if(strtotime(dateString) < time()) {
    # date is in the past
    }

    if(strtotime(dateString) == time()) {
    # date is right now
    }