Version 1, December 2009
Copyright (C) 2009 Philip Sturgeon email@philsturgeon.co.uk
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
Version 1, December 2009
Copyright (C) 2009 Philip Sturgeon email@philsturgeon.co.uk
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
{ | |
"require": { | |
"illuminate/foundation": ">=1.0.0", | |
"illuminate/auth": ">=1.0.0", | |
"illuminate/database": ">=1.0.0", | |
"illuminate/view": ">=1.0.0", | |
"amazonwebservices/aws-sdk-for-php": "1.5.*", | |
"codeguy/upload": "*", | |
"sybio/image-workshop" : "*", |
WEES GEEN LUL PUBLIEKE LICENTIE | |
Versie 1, December 2009 | |
Copyright (C) 2009 Philip Sturgeon <email@philsturgeon.co.uk> | |
Iedereen heeft toestemming dit document te kopiëren en te distribuëren, | |
en veranderen is toegestaan als je de naam van het document verandert. | |
WEES GEEN LUL PUBLIEKE LICENTIE |
<?php | |
function calculateDateDiff($strStart, $strEnd) { | |
$objStart = DateTime::createFromFormat("m/j/Y g:i:s A", $strStart); | |
$objEnd = DateTime::createFromFormat("m/j/Y g:i:s A", $strEnd); | |
// Return Total Seconds | |
return $objEnd->getTimestamp() - $objStart->getTimestamp(); | |
// Return formatted diference (7hrs 5mins and 43 seconds) | |
return $objStart->diff($objEnd)->format('%hhrs %imins and %sseconds '); |
<?php | |
function calculateDateDiff($strStart, $strEnd) { | |
$parts = explode(' ', $strStart); | |
$dates = explode('/', $parts[0]); | |
$times = explode(':', $parts[1]); | |
$unix_start = mktime($times[0], $times[1], $times[2], $dates[0], $dates[1], $dates[2]); | |
$parts = explode(' ', $strEnd); | |
$dates = explode('/', $parts[0]); | |
$times = explode(':', $parts[1]); |
<?php | |
function formatDate($strDate) { | |
return DateTime::createFromFormat("m/j/Y g:i:s A", $strDate)->format('Y-m-d H:i:s'); | |
} |
<?php | |
function formatDate($strDate) { | |
$parts = explode(' ', $strDate); | |
$dates = explode('/', $parts[0]); | |
$times = explode(':', $parts[1]); | |
// check to see if it is am or pm | |
if(strtolower($parts[2]) == 'pm' && $times[0] != 12) { | |
// add 12 to the hour as it needs to be military time | |
$times[0]+=12; | |
} |
// Traditional | |
$parts = explode(' ', $dateTime); | |
$dates = explode('/', $parts[0]); | |
$times = explode(':', $parts[1]); | |
// check to see if it is am or pm | |
if(strtolower($parts[2]) == 'pm' && $times[0] != 12) { | |
// add 12 to the hour as it needs to be military time | |
$times[0]+=12; | |
} |
<?php | |
/** | |
* TwitterHighlights | |
* Output filter to create links from Twitter @name, #tag and URLs | |
*/ | |
$input = preg_replace("#(^|[\n ])([\w]+?://[\w]+[^ \"\n\r\t< ]*)#", "\\1<a href=\"\\2\" rel=\"nofollow\">\\2</a>", $input); | |
$input = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r< ]*)#", "\\1<a href=\"http://\\2\" rel=\"nofollow\">\\2</a>", $input); | |
$input = preg_replace("/@(\w+)/", "<a href=\"https://www.twitter.com/\\1\" rel=\"nofollow\">@\\1</a>", $input); | |
$input = preg_replace("/#(\w+)/", "<a href=\"https://www.twitter.com/search/\\1\" rel=\"nofollow\">#\\1</a>", $input); |
// The result of the expression (true && false) is assigned to $g | |
// Acts like: ($g = (true && false)) | |
$g = true && false; | |
// The constant true is assigned to $h and then false is ignored | |
// Acts like: (($h = true) and false) | |
$h = true and false; |