date_api.module

Version 1.64.2.5.2.85 (checked in on 2009/05/12 at 12:57:45 by karens)

Constants

NameDescription
DATE_ARRAY
DATE_DATETIME
DATE_FORMAT_DATE
DATE_FORMAT_DATETIME
DATE_FORMAT_ICAL
DATE_FORMAT_ICAL_DATE
DATE_FORMAT_ISO
DATE_FORMAT_UNIX
DATE_ICAL
DATE_ISOSet up some constants.
DATE_OBJECT
DATE_REGEX_DATETIME
DATE_REGEX_ICAL_DATE
DATE_REGEX_ICAL_DATETIME
DATE_REGEX_ISO
DATE_REGEX_LOOSE
DATE_UNIX

Functions

NameDescription
date_ampmAn array of am and pm options.
date_api_add_system_javascriptHelper function; add system.js and javascript settings.
date_api_date_api_fieldsImplementation of hook_date_api_fields(). on behalf of core fields.
date_api_date_api_tablesImplement hook_date_api_tables().
date_api_date_formatsImplementation of hook_date_formats().
date_api_date_format_typesImplementation of hook_date_format_types().
date_api_date_time_lookupReturn the date for a given format string via Ajax.
date_api_elementsImplementation of hook_elements().
date_api_flush_cachesImplementation of hook_flush_caches().
date_api_form_system_date_time_settings_alterImplementation of hook_form_alter().
date_api_form_system_modules_alterImplementation of hook_form_alter().
date_api_initImplementation of hook_init().
date_api_menuImplementation of hook_menu().
date_api_menu_alterImplementation of hook_menu_alter().
date_api_set_db_timezoneWrapper around date handler setting for timezone.
date_api_simpletestImplementation of hook_simpletest().
date_api_system_modules_submitRebuild list of date formats when modules list is saved.
date_api_theme
date_api_views_apiImplementation of hook_views_api().
date_api_views_clearRebuild the theme registry and all the caches. needed to pick up changes created by updated Views API and other changes to Views definitions.
date_api_views_fetch_fieldsWrapper function to make sure this function will always work.
date_arrayCreate an array of values from a date object. Structured like the results of getdate() but not limited to the 32-bit signed range.
date_block_identifier
date_convertDate conversion helper function.
date_daysAn array of days.
date_days_in_monthIdentify the number of days in a month for a date.
date_days_in_yearIdentify the number of days in a year for a date.
date_day_of_weekReturns day of week for a given date (0 = Sunday).
date_day_of_week_nameReturns translated name of the day of week for a given date.
date_default_timezoneA timezone object for the default timezone.
date_default_timezone_nameReturn a timezone name to use as a default.
date_differenceCompute difference between two days using a given measure.
date_embed_viewEmbed a view using a PHP snippet.
date_formats_rebuildResets the database cache of date formats, and saves all new date formats to the database.
date_format_dateReworked from Drupal's format_date function to handle pre-1970 and post-2038 dates and accept a date object instead of a timestamp as input.
date_format_deleteDelete a date format from the database.
date_format_intervalAn override for interval formatting that adds past and future context
date_format_localeGet the appropriate date format for a type and locale.
date_format_optionsStore personalized format options for each user.
date_format_orderConvert a format to an ordered array of granularity parts.
date_format_patternsArray of regex replacement strings for date format elements. Used to allow input in custom formats. Based on work done for the Date module by Yves Chedemois (yched).
date_format_saveSave a date format to the database.
date_format_type_deleteDelete a date format type from the database.
date_format_type_saveSave a date format type to the database.
date_fuzzy_datetimeCreate valid datetime value from incomplete ISO dates or arrays.
date_get_formatGet the format details for a particular id.
date_get_formatsGet the list of date formats for a particular format length.
date_get_format_typesGet the list of available date format types and attributes.
date_get_timezoneFunction to figure out which local timezone applies to a date and select it
date_get_timezone_dbFunction to figure out which db timezone applies to a date and select it
date_granularity_namesArray of granularity options and their labels
date_has_date
date_has_timeFunction to figure out if any time data is to be collected or displayed.
date_hoursAn array of hours.
date_iso_arrayCreate an array of date parts from an ISO date.
date_iso_weeks_in_yearIdentify the number of ISO weeks in a year for a date.
date_is_validFunctions to test the validity of a date in various formats. Has special case for ISO dates and arrays which can be missing month and day and still be valid.
date_limit_formatRewrite a format string so it only includes elements from a specified granularity array.
date_limit_valueRecalculate a date so it only includes elements from a granularity array. Helps prevent errors when unwanted values round up and ensures that unwanted date part values don't get stored in the database.
date_make_dateConvert a date of any type or an array of date parts into a valid date object.
date_minutesAn array of minutes.
date_month_namesA translated array of month names
date_month_names_abbrA translated array of month name abbreviations
date_month_names_untranslatedAn untranslated array of month names
date_nongranularityAn difference array of granularity elements that are NOT in the granularity array. Used by functions that strip unwanted granularity elements out of formats and values.
date_nowA date object for the current time.
date_order
date_order_translatedHelper function for BYDAY options in Date Repeat and for converting back and forth from '+1' to 'First'.
date_padHelper function to left pad date parts with zeros. Provided because this is needed so often with dates.
date_part_extractExtract integer value of any date part from any type of date.
date_querystringPick up filter and sort info from url.
date_range_stringConvert a min and max year into a string like '-3:+1'.
date_range_yearsSplit a string like -3:+3 or 2001:2010 into an array of min and max years.
date_real_urlFigure out the URL of the date view we're currently looking at, adapted to various date types or specific date arguments.
date_secondsAn array of seconds.
date_tA function to translate ambiguous short date strings.
date_timezone_abbrAn array of timezone abbreviations that the system allows. Cache an array of just the abbreviation names because the whole timezone_abbreviations_list is huge so we don't want to get it more than necessary.
date_timezone_is_valid
date_timezone_namesA translated array of timezone names. Cache the untranslated array, make the translated array a static variable.
date_type_formatHelper function for getting the format string for a date type.
date_t_stringsConstruct translation arrays from pipe-delimited strings.
date_valid_day
date_valid_month
date_valid_year
date_weekThe calendar week number for a date.
date_weeks_in_yearThe number of calendar weeks in a year.
date_week_daysA translated array of week days
date_week_days_abbrAn translated array of week day abbreviations.
date_week_days_orderedOrder weekdays Correct weekdays array so first day in array matches the first day of the week. Use to create things like calendar headers.
date_week_days_untranslatedAn untranslated array of week days
date_week_rangeStart and end dates for a calendar week, adjusted to use the chosen first day of week for this site.
date_yearsAn array of years.
_date_formats_buildBuilds and returns the list of available date formats.
_date_format_types_buildBuilds and returns the list of available date format types.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters (without spaces) shown in the image.