233 lines
No EOL
8.6 KiB
HTML
Executable file
233 lines
No EOL
8.6 KiB
HTML
Executable file
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<title>Module: ActionView::Helpers::DateHelper</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
<script type="text/javascript">
|
|
// <![CDATA[
|
|
|
|
function popupCode( url ) {
|
|
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
}
|
|
|
|
function toggleCode( id ) {
|
|
if ( document.getElementById )
|
|
elem = document.getElementById( id );
|
|
else if ( document.all )
|
|
elem = eval( "document.all." + id );
|
|
else
|
|
return false;
|
|
|
|
elemStyle = elem.style;
|
|
|
|
if ( elemStyle.display != "block" ) {
|
|
elemStyle.display = "block"
|
|
} else {
|
|
elemStyle.display = "none"
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
// Make codeblocks hidden by default
|
|
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
|
|
// ]]>
|
|
</script>
|
|
|
|
</head>
|
|
<body>
|
|
|
|
|
|
|
|
<div id="classHeader">
|
|
<table class="header-table">
|
|
<tr class="top-aligned-row">
|
|
<td><strong>Module</strong></td>
|
|
<td class="class-name-in-header">ActionView::Helpers::DateHelper</td>
|
|
</tr>
|
|
<tr class="top-aligned-row">
|
|
<td><strong>In:</strong></td>
|
|
<td>
|
|
<a href="../../../files/lib/localization_simplified_rb.html">
|
|
lib/localization_simplified.rb
|
|
</a>
|
|
<br />
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</div>
|
|
<!-- banner header -->
|
|
|
|
<div id="bodyContent">
|
|
|
|
|
|
|
|
<div id="contextContent">
|
|
|
|
<div id="description">
|
|
<p>
|
|
Modify <a href="DateHelper.html">DateHelper</a> to use text from lang-file
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div id="method-list">
|
|
<h3 class="section-bar">Methods</h3>
|
|
|
|
<div class="name-list">
|
|
<a href="#M000007">date_select</a>
|
|
<a href="#M000008">datetime_select</a>
|
|
<a href="#M000006">distance_of_time_in_words</a>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<!-- if includes -->
|
|
|
|
<div id="section">
|
|
|
|
|
|
|
|
<div id="aliases-list">
|
|
<h3 class="section-bar">External Aliases</h3>
|
|
|
|
<div class="name-list">
|
|
<table summary="aliases">
|
|
<tr class="top-aligned-row context-row">
|
|
<td class="context-item-name">distance_of_time_in_words</td>
|
|
<td>-></td>
|
|
<td class="context-item-value">old_distance_of_time_in_words</td>
|
|
</tr>
|
|
<tr class="top-aligned-row context-row">
|
|
<td> </td>
|
|
<td colspan="2" class="context-item-desc">
|
|
Modify <a href="DateHelper.html">DateHelper</a> <a
|
|
href="DateHelper.html#M000006">distance_of_time_in_words</a>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr class="top-aligned-row context-row">
|
|
<td class="context-item-name">date_select</td>
|
|
<td>-></td>
|
|
<td class="context-item-value">orig_date_select</td>
|
|
</tr>
|
|
<tr class="top-aligned-row context-row">
|
|
<td class="context-item-name">datetime_select</td>
|
|
<td>-></td>
|
|
<td class="context-item-value">orig_datetime_select</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- if method_list -->
|
|
<div id="methods">
|
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
|
|
<div id="method-M000007" class="method-detail">
|
|
<a name="M000007"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000007" class="method-signature">
|
|
<span class="method-name">date_select</span><span class="method-args">(object_name, method, options = {})</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Blend default options with localized :order option
|
|
</p>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000007-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/localization_simplified.rb, line 117</span>
|
|
117: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">date_select</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span> = {})
|
|
118: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reverse_merge!</span>(<span class="ruby-constant">LocalizationSimplified</span><span class="ruby-operator">::</span><span class="ruby-constant">DateHelper</span><span class="ruby-operator">::</span><span class="ruby-constant">DateSelectOrder</span>)
|
|
119: <span class="ruby-identifier">orig_date_select</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>)
|
|
120: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000008" class="method-detail">
|
|
<a name="M000008"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000008" class="method-signature">
|
|
<span class="method-name">datetime_select</span><span class="method-args">(object_name, method, options = {})</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Blend default options with localized :order option
|
|
</p>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000008-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/localization_simplified.rb, line 126</span>
|
|
126: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">datetime_select</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span> = {})
|
|
127: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reverse_merge!</span>(<span class="ruby-constant">LocalizationSimplified</span><span class="ruby-operator">::</span><span class="ruby-constant">DateHelper</span><span class="ruby-operator">::</span><span class="ruby-constant">DateSelectOrder</span>)
|
|
128: <span class="ruby-identifier">orig_datetime_select</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>)
|
|
129: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000006" class="method-detail">
|
|
<a name="M000006"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000006" class="method-signature">
|
|
<span class="method-name">distance_of_time_in_words</span><span class="method-args">(from_time, to_time = 0, include_seconds = false)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000006-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/localization_simplified.rb, line 93</span>
|
|
93: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-identifier">to_time</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">include_seconds</span> = <span class="ruby-keyword kw">false</span>)
|
|
94: <span class="ruby-constant">LocalizationSimplified</span><span class="ruby-operator">::</span><span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-identifier">to_time</span>, <span class="ruby-identifier">include_seconds</span>)
|
|
95: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div id="validator-badges">
|
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
</div>
|
|
|
|
</body>
|
|
</html> |