Created
February 2, 2017 09:56
-
-
Save akroii/4dfd6b41eadfd8c99c742231c016a403 to your computer and use it in GitHub Desktop.
php date calculation for jquery for contao
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php $finalRawDate = $this->parseDate('Y/m/d H:i:s',strtotime($this->value));?> | |
| <?php $finalDateC = date('c', strtotime($finalRawDate));?> | |
| <?php $finalDateStr = date('Y-m-d', strtotime($finalRawDate));?> | |
| <?php $finalDate = date('Y-m-d\TH:i', strtotime($finalRawDate));?> | |
| <?php $passedRawDate = date("Y-m-d H:i:s", strtotime($finalRawDate . "+240 minutes"));?> | |
| <?php $passedDateC = date('c', strtotime($passedRawDate));?> | |
| <?php $passedDate = date('Y-m-d\TH:i', strtotime($passedRawDate));?> | |
| <?php | |
| $timestamp = strtotime("'.$finalDateStr.'");// your launch date '2020-07-30' | |
| $difference = $timestamp + time(); | |
| $passedDateMs = ($difference * 1000); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment