function ip2country_get_date_formats in IP-based Determination of a Visitor's Country 7
Provides implementation for ip2country_date_formats().
1 call to ip2country_get_date_formats()
- ip2country_date_formats in ./
ip2country.module - Implements hook_date_formats().
File
- ./
ip2country.formats.inc, line 18 - Implementation of hook_date_formats() for the ip2country module.
Code
function ip2country_get_date_formats() {
$formats = array();
// Date-only formats.
$formats[] = array(
'type' => 'ip2country_date',
'format' => 'n/j/Y',
'locales' => array(),
);
$formats[] = array(
'type' => 'ip2country_date',
'format' => 'm/d/Y',
'locales' => array(),
);
$formats[] = array(
'type' => 'ip2country_date',
'format' => 'd/m/Y',
'locales' => array(
'en-gb',
'en-hk',
'en-ie',
'el-gr',
'es-es',
'fr-be',
'fr-fr',
'fr-lu',
'it-it',
'nl-be',
'pt-pt',
),
);
$formats[] = array(
'type' => 'ip2country_date',
'format' => 'd.m.Y',
'locales' => array(
'de-ch',
'de-de',
'de-lu',
'fi-fi',
'fr-ch',
'is-is',
'pl-pl',
'ro-ro',
'ru-ru',
),
);
$formats[] = array(
'type' => 'ip2country_date',
'format' => 'Y-m-d',
'locales' => array(),
);
$formats[] = array(
'type' => 'ip2country_date',
'format' => 'Y/m/d',
'locales' => array(
'en-ca',
'fr-ca',
'no-no',
'sv-se',
),
);
$formats[] = array(
'type' => 'ip2country_date',
'format' => 'M j Y',
'locales' => array(),
);
$formats[] = array(
'type' => 'ip2country_date',
'format' => 'j M Y',
'locales' => array(),
);
$formats[] = array(
'type' => 'ip2country_date',
'format' => 'Y M j',
'locales' => array(),
);
// Time-only formats.
$formats[] = array(
'type' => 'ip2country_time',
'format' => 'H:i:s T',
'locales' => array(
'en-us',
'en-gb',
'en-hk',
'en-ie',
'el-gr',
'es-es',
'fr-be',
'fr-fr',
'fr-lu',
'it-it',
'nl-be',
'pt-pt',
'en-ca',
'fr-ca',
'no-no',
'sv-se',
'de-ch',
'de-de',
'de-lu',
'fi-fi',
'fr-ch',
'is-is',
'pl-pl',
'ro-ro',
'ru-ru',
),
);
$formats[] = array(
'type' => 'ip2country_time',
'format' => 'H:i',
'locales' => array(),
);
$formats[] = array(
'type' => 'ip2country_time',
'format' => 'g:ia',
'locales' => array(),
);
return $formats;
}