diff --git a/timeago.install b/timeago.install index 42210b2..86522b9 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) { @@ -125,4 +132,5 @@ function timeago_uninstall() { variable_del('timeago_node'); variable_del('timeago_comment'); variable_del('timeago_elem'); + variable_del('date_format_time_ago_dynamic'); } diff --git a/timeago.module b/timeago.module index 8dd4ed0..2a6b120 100644 --- a/timeago.module +++ b/timeago.module @@ -180,6 +180,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() {