Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
306
Merge Requests
306
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
913adae6
Commit
913adae6
authored
Jan 03, 2011
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#989366
by jhodgdon: Improved documentation of hook_date_formats()
parent
0ba31d93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
includes/common.inc
includes/common.inc
+2
-1
modules/system/system.api.php
modules/system/system.api.php
+8
-2
No files found.
includes/common.inc
View file @
913adae6
...
...
@@ -1830,7 +1830,8 @@ function format_interval($timestamp, $granularity = 2, $langcode = NULL) {
* @param $type
* (optional) The format to use, one of:
* - 'short', 'medium', or 'long' (the corresponding built-in date formats).
* - The name of a date type defined by a module in hook_date_format_types().
* - The name of a date type defined by a module in hook_date_format_types(),
* if it's been assigned a format.
* - The machine name of an administrator-defined date format.
* - 'custom', to use $format.
* Defaults to 'medium'.
...
...
modules/system/system.api.php
View file @
913adae6
...
...
@@ -3718,8 +3718,14 @@ function hook_archiver_info_alter(&$info) {
*
* Next to the 'long', 'medium' and 'short' date types defined in core, any
* module can define additional types that can be used when displaying dates. A
* date type is a key which can be passed to format_date() to return a date in
* the configured display format.
* date type is a key that can be passed to format_date() to return a date in
* the configured display format, once a format has been assigned to it. To
* assign a format to a date type, use
* @code variable_set('date_format_' . $type, $format); @endcode
* where $type is the machine-readable name defined here, and $format is a PHP
* date format string. This can also be done in the administrative interface,
* which allows date types defined here to be associated with date format
* strings defined in hook_date_formats().
*
* To avoid namespace collisions with date types defined by other modules, it is
* recommended that each date type starts with the module name. A date type
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment