diff --git a/timeago.install b/timeago.install index 42f07a9eb3f9f9f58337a4939720c578296899d0..a187d5cbabbd02d7c8b04cc53d494cd711b7eb06 100644 --- a/timeago.install +++ b/timeago.install @@ -15,6 +15,13 @@ if (!defined('TIMEAGO_LIBRARY_DOWNLOAD_URL')) { } /** + * Implements hook_install(). + */ +function timeago_install() { + variable_set('date_format_time_ago_dynamic', TIMEAGO_FORMAT_MEDIUM_US); +} + +/** * Implements hook_requirements(). */ function timeago_requirements($phase) { @@ -146,6 +153,7 @@ function timeago_uninstall() { 'timeago_js_strings_year', 'timeago_js_strings_years', 'timeago_js_strings_word_separator', + 'date_format_time_ago_dynamic', ); foreach ($variables as $variable) { diff --git a/timeago.module b/timeago.module index 585c47b273e85a630d3d0a3da629b6aa433a3c47..32a289a51e3913ad6dc79c052272a19742993f13 100644 --- a/timeago.module +++ b/timeago.module @@ -291,6 +291,15 @@ function timeago_date_formats() { } /** + * Implements hook_date_format_types(). + */ +function timeago_date_format_types() { + return array( + 'time_ago_dynamic' => t('Time ago (dynamically updating)'), + ); +} + +/** * Implements hook_init(). */ function timeago_init() {