Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 5a7d1ec464
Fetching contributors…

Cannot retrieve contributors at this time

46 lines (45 sloc) 1.304 kB
<h2>Formatos de Data</h2>
<div>
<table>
<tr>
<th scope="row">Date.today.to_s</th>
<td><%= Date.today.to_s %></td>
</tr>
<tr>
<th scope="row">Date.today.to_s(:default)</th>
<td><%= Date.today.to_s(:default) %></td>
</tr>
<tr>
<th scope="row">Date.today.to_s(:short)</th>
<td><%= Date.today.to_s(:short) %></td>
</tr>
<tr>
<th scope="row">Date.today.to_s(:long)</th>
<td><%= Date.today.to_s(:long) %></td>
</tr>
<tr>
<th scope="row">Date.today.to_s(:long_ordinal)</th>
<td><%= Date.today.to_s(:long_ordinal) %></td>
</tr>
<tr>
<th scope="row">Date.today.to_s(:only_day)</th>
<td><%= Date.today.to_s(:only_day) %></td>
</tr>
</table>
<p>Formatos padrão do Rails (Date::DATE_FORMATS) ainda funcionam:</p>
<table>
<tr>
<th scope="row">Date.today.to_s(:db)</th>
<td><%= Date.today.to_s(:db) %></td>
</tr>
<tr>
<th scope="row">Date.today.to_s(:number)</th>
<td><%= Date.today.to_s(:number) %></td>
</tr>
<tr>
<th scope="row">Date.today.to_s(:rfc822)</th>
<td><%= Date.today.to_s(:rfc822) %></td>
</tr>
</table>
</div>
<p style="text-align:right;"><%= link_to '&raquo; Formatos de Hora', :action => 'time_formats' %></p>
Jump to Line
Something went wrong with that request. Please try again.