diff --git a/block/flickr_block.install b/block/flickr_block.install
index f20cf60..3e6114b 100644
--- a/block/flickr_block.install
+++ b/block/flickr_block.install
@@ -659,5 +659,5 @@ function flickr_block_uninstall() {
   if ($field) {
      field_delete_field('field_flickr_geo');
   }
-  field_purge_batch(100);
+  field_purge_batch(500);
 }
diff --git a/block/flickr_block.module b/block/flickr_block.module
index 6a02db3..8f5f6e3 100644
--- a/block/flickr_block.module
+++ b/block/flickr_block.module
@@ -1115,8 +1115,8 @@ function flickr_block_view($delta = '') {
             }
             if (module_exists('date') && !is_numeric($settings['date']) && !empty($settings['date'])) {
               $value = field_get_items('node', $node, $settings['date']);
-              $datefrom = $value[0];
-              $dateto= $value[1];
+              $datefrom = substr($value[0]['value'], 0, strrpos($value[0]['value'], ' '));
+              $dateto= substr($value[0]['value2'], 0, strrpos($value[0]['value2'], ' '));
             }
              else {
               $datefrom = NULL;
diff --git a/filter/flickr_filter.module b/filter/flickr_filter.module
index 889b913..3452642 100644
--- a/filter/flickr_filter.module
+++ b/filter/flickr_filter.module
@@ -53,6 +53,18 @@ function flickr_filter_tips($filter, $format, $long = FALSE) {
       'title' => t('Go to Flickr configuration page'),
     ),
   ));
+  $dateformats = l(t('Accepted date formats'), 'http://php.net/manual/en/datetime.formats.date.php/', array(
+    'attributes' => array(
+      'title' => t('PHP: Date Formats - Manual'),
+      'target' => '_blank',
+    ),
+  ));
+  $relativeformats = l(t('relative formats'), 'http://php.net/manual/en/datetime.formats.relative.php/', array(
+    'attributes' => array(
+      'title' => t('PHP: Relative Formats - Manual'),
+      'target' => '_blank',
+    ),
+  ));
   $count = variable_get('flickr_counter', 1) ? 'true' : 'false';
   $extend = variable_get('flickr_extend', 1) ? 'true' : 'false';
   $default_userid = variable_get('flickr_default_userid', '');
@@ -93,20 +105,20 @@ function flickr_filter_tips($filter, $format, $long = FALSE) {
     </tr>
   </table>
   n (320px) and c (800px) sizes are missing on \"older\" Flickr images. Photos with non existing sizes will be skipped in albums.<br /><br />
-  <strong>PARAMETER EXAMPLES</strong> (omit a parameter to use the default value):<br />
+  <strong>PARAMETER EXAMPLES</strong>. Omitting a parameter will result in the default value to be used.<br />
   <strong>id=lolandese1</strong> : A photo, set, user or group ID. <strong>id=public</strong> grabs CC licensed public photos (only for <em>[flickr-user:...]</em>). <strong>Default: id=@default_userid</strong> (!config).<br />&nbsp;&nbsp;!find_id Valid ID values: numeric ID (the one that contains a '@'), path alias, Flickr username or the user's email.<br />
-  <strong>class=\"floatleft foo bar\"</strong> : Syntax as in HTML. Wrap the value in quotes (or not) and put spaces between multiple classes. Applies to the outer HTML element of a photo or album.<br />
-  <strong>style=\"float:left; border:solid 2px;\"</strong> : Syntax as in HTML. Wrap the value in quotes (or not) and put semicolons between different style declarations. Applies to the outer HTML element of a photo or album.<br />
-  <strong>size=q</strong> : Big square (150px). The sizes x and y display a slideshow and ignore number, media, tags, location and sort settings. <strong>Default single photo: size=@default_size, album photo: size=@default_size_album</strong> (both !config).<br />
-  <strong>num=4</strong> : Display 4 photos. <strong>Default: num=@default_number</strong> (!config). For albums only.<br />&nbsp;&nbsp;If set to 1, the single image will behave as such. Heading and counter will be omitted, and float might apply. Used to display a single changing random or recent image.<br />
+  <strong>class=\"floatleft foo bar\"</strong> : Syntax as in HTML. Wrap the value in quotes (or not) and put spaces between multiple classes.<br />&nbsp;&nbsp;Applies to the outer HTML element of a photo or album.<br />
+  <strong>style=\"float:left; border:solid 2px;\"</strong> : Syntax as in HTML. Wrap the value in quotes (or not) and put semicolons between different style declarations.<br />&nbsp;&nbsp;Applies to the outer HTML element of a photo or album.<br />
+  <strong>size=q</strong> : Big square (150px). The sizes x and y display a slideshow and ignore number, media, tags, location and sort settings.<br />&nbsp;&nbsp;<strong>Default single photo: size=@default_size, album photo: size=@default_size_album</strong> (both !config).<br />
+  <strong>num=4</strong> : Display 4 photos. <strong>Default: num=@default_number</strong> (!config). For albums only.<br />&nbsp;&nbsp;If set to 1, the single image will behave as such. Heading and counter will be omitted, and float might apply.<br />&nbsp;&nbsp;Used to display a single changing random or recent image.<br />
   <strong>media=all</strong> : Display both photos and videos. <strong>Default: media=photos</strong>. For albums only.<br />
-  <strong>tags=kids/men</strong> : <strong>Separate multiple tags with a slash (/).</strong> Display all set, group or user photos that contain the indicated tags. Case insensitive, matches any tag, for photosets and galleries even partial.<br />&nbsp;&nbsp;You can exclude results that match a term by prepending it with a - character.<br />&nbsp;&nbsp;Public albums will only display photos that match all tags. Like on Flickr spaces are removed from tags (e.g. 'Victoria park' becomes 'victoriapark'). For albums only.<br />
-  <strong>extend=true</strong> : Extend the tag filter to search for matching terms also in the Flickr photo title and description besides Flickr tags. <strong>Default: extend=@default_extend</strong> (!config). For albums only.<br />
+  <strong>tags=kids/men</strong> : <strong>Separate multiple tags with a slash (/).</strong> Display all set, group or user photos that contain the indicated tags.<br />&nbsp;&nbsp;Case insensitive, matches any tag, for photosets and galleries even partial. You can exclude results that match a term by prepending it with a - character.<br />&nbsp;&nbsp;Public albums will only display photos that match all tags. Like on Flickr spaces are removed from tags (e.g. 'Victoria park' becomes 'victoriapark').<br />&nbsp;&nbsp;For albums only.<br />
+  <strong>extend=true</strong> : Extend the tag filter to search for matching terms also in the Flickr photo title and description besides Flickr tags.<br />&nbsp;&nbsp;<strong>Default: extend=@default_extend</strong> (!config). For albums only.<br />
   <strong>tag_mode=all</strong> : Matches 'all' defined tags (AND). The other possible value is 'any' (OR).<br />&nbsp;&nbsp;If this parameter is omitted, 'all' is used if no Flickr user ID is known (public search), otherwise 'any' is used. For albums only.<br />
-  <strong>location=48.85837/2.294481/0.2</strong> : Display photos within 200 mt from the Eiffel Tower. Lat/lon/radius (in km). Separate values with a slash (/).<br />&nbsp;&nbsp;To get the coordinates for a location, right-click on a Google map and choose 'What's here?' or copy/paste it from the URL. Substitute the comma (,) with a slash (/).<br />&nbsp;&nbsp;Optionally add a radius to force a major number of results to filter on (max. 32 km). If omitted it defaults to 14 meter and gradually expands to 32 km until a sufficient number of results are returned.<br />&nbsp;&nbsp;For user and group albums only, also public.<br />
-  <strong>date=2015-01-11</strong> : Display photos taken on 11 January 2015. Format: YYYY-MM-DD. Separate two date values with a slash (/) to cover a timespan of multiple days. For user and group albums only, also public.<br />&nbsp;&nbsp;Use it in combination with a location to grab public photos of events.<br />
+  <strong>location=48.85837/2.294481/0.2</strong> : Display photos within 200 mt from the Eiffel Tower. Lat/lon/radius (in km). Separate values with a slash (/).<br />&nbsp;&nbsp;To get the coordinates for a location, right-click on a Google map and choose 'What's here?' or copy/paste it from the URL.<br />&nbsp;&nbsp;Substitute the comma (,) with a slash (/). Optionally add a radius to force a major number of results to filter on (max. 32 km).<br />&nbsp;&nbsp;If omitted it defaults to 14 meter and gradually expands to 32 km until a sufficient number of results are returned.<br />&nbsp;&nbsp;For user and group albums only, also public.<br />
+  <strong>date=2015-01-11</strong> : Display photos taken on 11 January 2015. !dateformats, also !relativeformats (e.g. 'first day of last month | last day of last month').<br />&nbsp;&nbsp;Separate two date values with a vertical bar (|) to cover a timespan of multiple days. For user and group albums only, also public.<br />&nbsp;&nbsp;Tip: Use it in combination with a location to grab public photos of an event.<br />
   <strong>heading=h3</strong> : Wraps the album title in HTML tags. Use 'p' to apply no style or 'none' to suppress the title. <strong>Default heading=@default_heading</strong> (!config). For albums only.<br />
-  <strong>sort=views</strong> : Display the most viewed Flickr photos first (popularity, slower response after cache clear). Other values: <em>unsorted</em> = recent as delivered by the Flickr API (fastest response),<br />&nbsp;&nbsp;<em>random</em> (slower response after cache clear), <em>taken</em> (newest first), <em>posted</em> (newest first) , <em>added</em> (for groups only, newest first) and <em>id</em> (on photo ID, newest first). <strong>Default: sort=unsorted</strong>. For albums only.<br />
+  <strong>sort=views</strong> : Display the most viewed Flickr photos first (popularity, slower response after cache clear).<br />&nbsp;&nbsp;Other values: <em>unsorted</em> = recent as delivered by the Flickr API (fastest response),<br />&nbsp;&nbsp;<em>random</em> (slower response after cache clear), <em>taken</em> (newest first), <em>posted</em> (newest first) , <em>added</em> (for groups only, newest first) and <em>id</em> (on photo ID, newest first). <strong>Default: sort=unsorted</strong>. For albums only.<br />
   <strong>filter=interesting</strong> : Display the most interesting photos. Other possible value: <em>relevant</em>. For user and group albums only, also public.<br />
   <strong>count=false</strong> : Suppress display of the counter under the album (e.g. <em>5 out of 124 on Flickr</em>). <strong>Default: count=@default_count</strong> (!config). For albums only.<br />
   <strong>mintitle=999</strong> : Suppress display of the title in the photo captions for images below a width of 999 px. <strong>Default: mintitle=@default_mintitle</strong> (!config).<br />
@@ -124,6 +136,8 @@ function flickr_filter_tips($filter, $format, $long = FALSE) {
     '@default_count' => $count,
     '@default_extend' => $extend,
     '!config' => $config,
+    '!dateformats' => $dateformats,
+    '!relativeformats' => $relativeformats,
   ));
   if ($long) {
     $output .= ' ' . t('The size parameter can be one of the following:');
@@ -171,7 +185,7 @@ function flickr_filter_split_config($string) {
   // Put each setting on its own line.
   $string = str_replace(',', "\n", $string);
   // Break them up around commas.
-  preg_match_all('/([a-zA-Z_.]+)=([-@\/0-9a-zA-Z :;_.\%"\'&]+)/', $string, $parts, PREG_SET_ORDER);
+  preg_match_all('/([a-zA-Z_.]+)=([-@\/0-9a-zA-Z :;_.\|\%"\'&]+)/', $string, $parts, PREG_SET_ORDER);
   foreach ($parts as $part) {
     // Normalize to lowercase and remove extra spaces.
     $name = strtolower(trim($part[1]));
@@ -282,7 +296,7 @@ function flickr_filter_callback_album($matches) {
     $config['date'][1] = NULL;
   }
   else {
-    $config['date'] = explode("/", $config['date']);
+    $config['date'] = explode("|", $config['date']);
     if (!isset($config['date'][1])) {
       $config['date'][1] = NULL;
     }
@@ -406,7 +420,7 @@ function flickr_filter_callback_group($matches) {
     $config['date'][1] = NULL;
   }
   else {
-    $config['date'] = explode("/", $config['date']);
+    $config['date'] = explode("|", $config['date']);
     if (!isset($config['date'][1])) {
       $config['date'][1] = NULL;
     }
@@ -506,7 +520,7 @@ function flickr_filter_callback_gallery($matches) {
     $config['date'][1] = NULL;
   }
   else {
-    $config['date'] = explode("/", $config['date']);
+    $config['date'] = explode("|", $config['date']);
     if (!isset($config['date'][1])) {
       $config['date'][1] = NULL;
     }
@@ -610,7 +624,7 @@ function flickr_filter_callback_favorites($matches) {
     $config['date'][1] = NULL;
   }
   else {
-    $config['date'] = explode("/", $config['date']);
+    $config['date'] = explode("|", $config['date']);
     if (!isset($config['date'][1])) {
       $config['date'][1] = NULL;
     }
diff --git a/flickr.admin.inc b/flickr.admin.inc
index 9cc7210..09b81df 100644
--- a/flickr.admin.inc
+++ b/flickr.admin.inc
@@ -202,6 +202,65 @@ function flickr_admin_settings() {
       'caption' => t('In the photo caption'),
     ),
   );
+  $form['date_formats_settings'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Date formats'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+  );
+  // Get list of all available date formats.
+  drupal_static_reset('system_get_date_types');
+  $formats = array();
+  foreach (system_get_date_types() as $f => $format) {
+    if (($format_string = variable_get('date_format_' . $f, FALSE)) === FALSE) {
+      $format_string = key(system_get_date_formats($f));
+    }
+
+    if (!empty($format_string)) {
+      $formats[$f] = $format['title'] . ' [' . format_date(REQUEST_TIME, 'custom', $format_string) . ']';
+    }
+  }
+  $formats['interval'] = 'Time ago [' . format_interval(3600 * 24 * 90, 1) . ' ago]';
+  $form['date_formats_settings']['flickr_date_format_image_title'] = array(
+    '#type' => 'select',
+    '#title' => t('When hovering an image (mouse-over)'),
+    '#default_value' => variable_get('flickr_date_format_image_title', 'medium'),
+    '#options' => $formats,
+    '#empty_option' => t('- None -'),
+    '#empty_value' => 'none',
+  );
+  $form['date_formats_settings']['flickr_date_format_image_caption'] = array(
+    '#type' => 'select',
+    '#title' => t('In the image caption'),
+    '#default_value' => variable_get('flickr_date_format_image_caption', 'interval'),
+    '#options' => $formats,
+    '#empty_option' => t('- None -'),
+    '#empty_value' => 'none',
+  );
+  $form['date_formats_settings']['flickr_date_format_image_caption_hover'] = array(
+    '#type' => 'select',
+    '#title' => t('When hovering a date in the caption'),
+    '#description' => t("If you don't want to display anything when hovering the date, select 'None'."),
+    '#default_value' => variable_get('flickr_date_format_image_caption_hover', 'long'),
+    '#options' => $formats,
+    '#empty_option' => t('- None -'),
+    '#empty_value' => 'none',
+  );
+  // Disable the caption hover option if a date in the caption is set to 'none'.
+  if (variable_get('flickr_date_format_image_caption', 'interval') == 'none') {
+    $form['date_formats_settings']['flickr_date_format_image_caption_hover']['#disabled'] = TRUE;
+    $form['date_formats_settings']['flickr_date_format_image_caption_hover']['#title'] = '<span class="grayed-out">' . t('When hovering a date in the caption') . '</span>';
+    $form['date_formats_settings']['flickr_date_format_image_caption_hover']['#description'] = t('Disabled until a date format for the image caption is selected.');
+  }
+  $form['date_formats_settings']['flickr_date_format_album_title'] = array(
+    '#type' => 'select',
+    '#title' => t('In the album title'),
+    '#description' => t("If the selected date format contains a time, only the date part of it will be used in the album title."),
+    '#default_value' => variable_get('flickr_date_format_album_title', 'short'),
+    '#options' => $formats,
+    '#empty_option' => t('- None -'),
+    '#empty_value' => 'none',
+  );
   $colorbox_module = l(t('Colorbox module'), 'https://drupal.org/project/colorbox', array(
       'attributes' => array(
         'title' => t('Colorbox| Drupal.org'),
diff --git a/flickr.inc b/flickr.inc
index 49685be..76fee0a 100644
--- a/flickr.inc
+++ b/flickr.inc
@@ -310,7 +310,18 @@ function flickr_img($photo, $size = NULL, $attributes = NULL) {
   }
   $info = !is_array($photo['title']) ? flickr_photos_getinfo($photo['id']) : '';
   if (isset($info['dates']) || isset($photo['dates'])) {
-    $taken_short = isset($info['dates']['taken']) ? format_date(strtotime($info['dates']['taken']), 'short', '', NULL) : format_date(strtotime($photo['dates']['taken']), 'short', '', NULL);
+    $date_taken = isset($info['dates']['taken']) ? $info['dates']['taken'] : $photo['dates']['taken'];
+    $format_title = variable_get('flickr_date_format_image_title', 'medium');
+    switch ($format_title) {
+      case 'interval':
+        $taken_short = format_interval(time() - strtotime($date_taken), 1) . ' ' . t('ago');
+        break;
+      case 'none':
+        $taken_short = '';
+        break;
+      default:
+        $taken_short = format_date(strtotime($date_taken), $format_title, '', NULL);
+    }
   }
   $taken_short = empty($taken_short) ? '' : $taken_short . ' - ';
   $title = is_array($photo['title']) ? str_replace('"', "'", htmlspecialchars_decode(strip_tags($photo['description']['_content']))) : str_replace('"', "'", htmlspecialchars_decode(strip_tags($info['description']['_content'])));
@@ -568,11 +579,41 @@ function flickr_album($type = 'user', $id = '39873962@N08', $show_n = NULL, $siz
   // As variables might change during processing, we set a fixed version of it
   // to use for the key to set the block cache after processing at the end.
   $idfix = $id;
+  // Standardize the date format, independent from the input.
   $datefromfix = $datefrom;
   $datetofix = $dateto;
   if (!isset($dateto)) {
     $dateto = $datefrom;
   }
+  $datestart = strtotime($datefrom);
+  $dateend = strtotime($dateto);
+  // Try again but turning DD/MM/YYYY to DD-MM-YYYY.
+  // See http://www.hashbangcode.com/node/702 (first part only).
+  if (!empty($datefrom) && ($datestart === FALSE || $dateend === FALSE || $datestart > $dateend)) {
+    $datestart = strtotime(str_replace('/', '-', $datefrom));
+    $dateend = strtotime(str_replace('/', '-', $dateto));
+    $ambiguous = l(t('ambiguous'), 'http://php.net/manual/en/function.strtotime.php#100144', array(
+      'attributes' => array(
+        'title' => t('PHP: strtotime - Manual'),
+        'target' => '_blank',
+      ),
+    ));
+    $dateformat = l(t('accepted date format'), 'http://php.net/manual/en/datetime.formats.date.php/', array(
+      'attributes' => array(
+        'title' => t('PHP: Date Formats - Manual'),
+        'target' => '_blank',
+      ),
+    ));
+    drupal_set_message(t("You used the date format DD/MM/YYYY (starting with the day). As some dates are !ambiguous (e.g. is 04/05/2013 5 April or 4 May?) it is recommended to use dashes when you start with the day (DD-MM-YYYY), slashes when you start with the month (MM/DD/YYYY) or use any other !dateformat (e.g. 11 Jan 2015).", array(
+        '!ambiguous' => $ambiguous,
+        '!dateformat' => $dateformat,
+      )), 'warning', FALSE);
+  }
+  if (!empty($datefrom) && ($datestart === FALSE || $dateend === FALSE)) {
+    drupal_set_message(t("Invalid date provided."), 'error', FALSE);
+  }
+  $datefrom = empty($datefrom) ? '' : date("Y-m-d", $datestart);
+  $dateto = empty($dateto) ? '' : date("Y-m-d", $dateend);
   $datefrom = isset($datefrom) ? $datefrom . ' 00:00:00' : '';
   $dateto = isset($dateto) ? $dateto . ' 23:59:59' : '';
   // Remove spaces from tags but save the original for matches in text instead
@@ -587,7 +628,7 @@ function flickr_album($type = 'user', $id = '39873962@N08', $show_n = NULL, $siz
   if ($tag_mode == 'context') {
     $tag_mode = empty($id) || $id == 'public' || $id == '39873962@N08' ? 'all' : 'any';
   }
-  if ($extend && $tag_mode == 'all') {
+  if ($extend && $tag_mode == 'all' && strpos($tags, ',') !== FALSE) {
     $tag_mode = 'any';
     drupal_set_message(t("The tag mode has been forced to 'any' (OR) for extended text matching (tags, titles and description). To use 'all' (AND) put 'extend=false' in Flickr's text filter code."), 'warning', FALSE);
   }
@@ -738,23 +779,51 @@ function flickr_album($type = 'user', $id = '39873962@N08', $show_n = NULL, $siz
 
     $tagged = (empty($tags) || $size == 'x' || $size == 'y') ? '' : '<span class="flickr-tags-wrap">' . $flickr;
     // A single date.
-    if ((empty($datetofix) || $datetofix == $datefromfix) && !empty($datefromfix)) {
-      $str = format_date(strtotime(substr($datefrom, 0, 10)), 'medium', '', NULL);
-      // Remove everthing after the last dash to remove the time.
-      $taken = ' ' . t('taken on') . ' ' . substr($str, 0, strrpos($str, '-'));
+    $format = empty($datefrom) ? 'none' : variable_get('flickr_date_format_album_title', 'short');
+    switch ($format) {
+      case 'interval':
+        $formated_datefrom = format_interval(time() - strtotime(substr($datefrom, 0, 10)), 1);
+        $formated_dateto = format_interval(time() - strtotime(substr($dateto, 0, 10)), 1);
+        break;
+      default:
+        $formated_datefrom = format_date(strtotime(substr($datefrom, 0, 10)), $format, '', NULL);
+        $formated_dateto = format_date(strtotime(substr($dateto, 0, 10)), $format, '', NULL);
+    }
+    if ((empty($datetofix) || $datetofix == $datefromfix || $formated_datefrom == $formated_dateto) && !empty($datefromfix)) {
+      // Remove the time by capturing anything preceding one or more digits
+      // followed by a colon. See http://rubular.com/r/7IJhj19P9K
+      $match1 = preg_match('/^(.*?)[-|\s].\d*:/', $formated_datefrom, $match);
+      // Only use the match if there is one (date with time).
+      $date1 = isset($match[1]) ? $match[1] : $formated_datefrom;
+      $taken = ($format == 'interval') ? ' ' . t('taken') . ' ' . $formated_datefrom . ' ' . t('ago') : ' ' . t('taken on') . ' ' . $date1;
     }
     // Multiple days.
     elseif (!empty($datefromfix)) {
-      // Remove everthing after the last dash to remove the time.
-      $str = format_date(strtotime(substr($datefrom, 0, 10)), 'medium', '', NULL);
-      $strto = format_date(strtotime(substr($dateto, 0, 10)), 'medium', '', NULL);
-      $taken = ' ' . t('taken from') . ' ' . substr($str, 0, strrpos($str, '-')) . ' ' . t('to') . ' ' . substr($strto, 0, strrpos($strto, '-'));
+      // Remove the times.
+      $match1 = preg_match('/^(.*?)[-|\s].\d*:/', $formated_datefrom, $matchfrom);
+      if (isset($matchfrom[1])) {
+        preg_match('/^(.*?)[-|\s].\d*:/', $formated_dateto, $matchto);
+        $date1 = $matchfrom[1];
+        $date2 = $matchto[1];
+      }
+      else {
+        $date1 = $formated_datefrom;
+        $date2 = $formated_dateto;
+      }
+      switch ($format) {
+        case 'interval':
+          $taken = ' ' . t('taken') . ' ' . $formated_datefrom . ' ' . t('to') . ' ' . $formated_dateto . ' ' . t('ago');
+          break;
+        default:
+          $taken = ' ' . t('taken from') . ' ' . $date1 . ' ' . t('to') . ' ' . $date2;
+      }
     }
     else {
       $taken = '';
       $datefrom = '';
       $dateto = '';
     }
+    $taken = $format == 'none' ? '' : $taken;
 
     // Generate an album heading depending on type.
     switch ($type) {
diff --git a/flickr.install b/flickr.install
index e195ccf..18b44d6 100644
--- a/flickr.install
+++ b/flickr.install
@@ -47,6 +47,10 @@ function flickr_uninstall() {
   variable_del('flickr_maps');
   variable_del('flickr_geophp');
   variable_del('flickr_smart');
+  variable_del('flickr_date_format_image_title');
+  variable_del('flickr_date_format_image_caption');
+  variable_del('flickr_date_format_image_caption_hover');
+  variable_del('flickr_date_format_album_title');
 }
 
 /**
diff --git a/flickr.module b/flickr.module
index e997d28..3a518f1 100644
--- a/flickr.module
+++ b/flickr.module
@@ -615,8 +615,37 @@ function theme_flickr_photo($variables) {
   // Real name if it exists else the username. Link to Flickr profile page.
   // Replace with $people['photostream'] if you want to link to the photostream.
   $username = $people['name'];
-  // The date an image was taken formatted as 'time ago'.
-  $taken = isset($info['dates']['taken']) ? '<a title="' . format_date(strtotime($info['dates']['taken']), 'long', '', NULL) . '">' . format_interval(time() - strtotime($info['dates']['taken']), 1) . '</a> ' . t('ago') : '';
+  // The date an image was taken.
+  $taken = '';
+  if (isset($info['dates']['taken'])) {
+    // Format the date displayed in the image caption.
+    $format_taken = variable_get('flickr_date_format_image_caption', 'interval');
+    switch ($format_taken) {
+      case 'interval':
+        $taken = format_interval(time() - strtotime($info['dates']['taken']), 1) . ' ' . t('ago');
+        break;
+      case 'none':
+        $taken = '';
+        break;
+      default:
+        $taken = format_date(strtotime($info['dates']['taken']), $format_taken, '', NULL);
+    }
+    // Format the date displayed when hovering the date on image caption.
+    $format_hover = variable_get('flickr_date_format_image_caption_hover', 'long');
+    switch ($format_hover) {
+      case 'interval':
+        $taken_hover = format_interval(time() - strtotime($info['dates']['taken']), 1) . ' ' . t('ago');
+        break;
+      case 'none':
+        $taken_hover = '';
+        break;
+      default:
+        $taken_hover = format_date(strtotime($info['dates']['taken']), $format_hover, '', NULL);
+    }
+    // Finalize the formatting.
+    $taken = (empty($taken_hover)) ? $taken : '<a title="' . $taken_hover . '">' . $taken . '</a>';
+    $taken .= ($format_taken == 'interval') ? ' ' . t('ago') : '';
+  }
   // A bunch of geo data.
   $neighbourhood = isset($info['location']['neighbourhood']['_content']) ? strip_tags($info['location']['neighbourhood']['_content']) . ', ' : '';
   $locality = isset($info['location']['locality']['_content']) ? strip_tags($info['location']['locality']['_content']) . ', ' : '';
