You are here

function interval_interval_intervals in Interval Field 7

Implements hook_interval_intervals

File

./interval.module, line 344
Defines an interval field @copyright Copyright(c) 2011 Rowlands Group @license GPL v2+ http://www.fsf.org/licensing/licenses/gpl.html @author Lee Rowlands leerowlands at rowlandsgroup dot com

Code

function interval_interval_intervals() {
  return array(
    'second' => array(
      'plural' => t('Seconds', array(), array(
        'context' => 'interval',
      )),
      'singular' => t('Second', array(), array(
        'context' => 'interval',
      )),
      'php' => 'seconds',
      'multiplier' => 1,
    ),
    'minute' => array(
      'plural' => t('Minutes', array(), array(
        'context' => 'interval',
      )),
      'singular' => t('Minute', array(), array(
        'context' => 'interval',
      )),
      'php' => 'minutes',
      'multiplier' => 1,
    ),
    'hour' => array(
      'plural' => t('Hours', array(), array(
        'context' => 'interval',
      )),
      'singular' => t('Hour', array(), array(
        'context' => 'interval',
      )),
      'php' => 'hours',
      'multiplier' => 1,
    ),
    'day' => array(
      'plural' => t('Days', array(), array(
        'context' => 'interval',
      )),
      'singular' => t('Day', array(), array(
        'context' => 'interval',
      )),
      'php' => 'days',
      'multiplier' => 1,
    ),
    'month' => array(
      'plural' => t('Months', array(), array(
        'context' => 'interval',
      )),
      'singular' => t('Month', array(), array(
        'context' => 'interval',
      )),
      'php' => 'months',
      'multiplier' => 1,
    ),
    'year' => array(
      'plural' => t('Years', array(), array(
        'context' => 'interval',
      )),
      'singular' => t('Year', array(), array(
        'context' => 'interval',
      )),
      'php' => 'years',
      'multiplier' => 1,
    ),
    'week' => array(
      'plural' => t('Weeks', array(), array(
        'context' => 'interval',
      )),
      'singular' => t('Week', array(), array(
        'context' => 'interval',
      )),
      'php' => 'days',
      'multiplier' => 7,
    ),
    'fortnight' => array(
      'plural' => t('Fortnights', array(), array(
        'context' => 'interval',
      )),
      'singular' => t('Fortnight', array(), array(
        'context' => 'interval',
      )),
      'php' => 'days',
      'multiplier' => 14,
    ),
    'quarter' => array(
      'plural' => t('Quarters', array(), array(
        'context' => 'interval',
      )),
      'singular' => t('Quarter', array(), array(
        'context' => 'interval',
      )),
      'php' => 'months',
      'multiplier' => 3,
    ),
  );
}