Created
July 16, 2013 18:57
-
-
Save chadsten/6011544 to your computer and use it in GitHub Desktop.
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
| <? | |
| #$case = "2013-07-17 18:15:00 to 2013-07-19 18:15:00"; | |
| $case = "2013-07-25 18:15:00 to 2013-07-25 19:15:00"; | |
| #$case = "2013-07-24 19:00:00"; | |
| #$case = "2013-07-28 14:00:00 to 2013-07-30 22:00:00"; | |
| $set = split(' to ', $case); // Split the to and from dates up first | |
| foreach ($set as $item) { | |
| $raw[] = split(' ',$item); // Split the time and date up | |
| } | |
| ?> | |
| <div class="date-time-wrapper date"> | |
| <span class="date-time date from"><?= $raw['0']['0']; ?></span> | |
| <?php if ($raw['1']['0'] && $raw[0][0] != $raw[1][0]) { ?> <span class="separator"> - </span><span class="date-time date to"><?= $raw['1']['0']; ?></span> <?php } ?> | |
| </div> | |
| <div class="date-time-wrapper time"> | |
| <span class="date-time time from"><?= $raw['0']['1']; ?></span> | |
| <?php if ($raw['1']['1']) { ?><span class="separator"> - </span><span class="date-time time to"><?= $raw['1']['1']; ?></span> <?php } ?> | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment