Permalink
Browse files

Updated dependencies, started writing relativeTimeElement()

  • Loading branch information...
1 parent 035c0a9 commit e3e899859bbb44ab26a2aff0cfaceff77aae8710 @barnabywalters committed Dec 15, 2012
Showing with 83 additions and 22 deletions.
  1. +12 −0 BarnabyWalters/Helpers/Helpers.php
  2. +2 −1 composer.json
  3. +69 −21 composer.lock
@@ -2,6 +2,9 @@
namespace BarnabyWalters\Helpers;
+use Carbon\Carbon;
+use DateTime;
+
/**
* Functional Helpers
*
@@ -115,6 +118,15 @@ public static function timeElement($datetime) {
$t = '<time datetime="' . $datetime->format('Y-m-d') . '" title="' . $datetime->format('Y-z') . '">' . $datetime->format('Y-m-d') . '</time>';
return $t;
}
+
+ public static function relativeTimeElement(
+ DateTime $datetime,
+ DateTime $comparison = null) {
+ if ($comparison == null)
+ $comparison = Carbon::now();
+
+
+ }
/**
* Slugify
View
@@ -8,7 +8,8 @@
}
},
"require": {
- "tantek/cassis": "*"
+ "tantek/cassis": "*",
+ "nesbot/Carbon": "*"
},
"require-dev": {
"doctrine/orm": "*",
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit e3e8998

Please sign in to comment.