You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

39 lines
1.3 KiB

Para maiores exemplos olhe os testes.<br/>
<br/>
Para usar a as regras de plural em português basta adicionar a linha acima no seu enviroment.rb
<br/>
To use the inflector in portuguese add this line to your enviroment.rb
<br/>
require 'inflector_portuguese'<br/>
<br/>
"2007/01/02".to_date<br/>
"13/12/2007".to_date<br/>
"01-02-2007".to_date<br/>
<br/>
"01/02/2007".to_date.to_s returns "2007-02-01"<br/>
<br/>
"13/12/2007".to_date.to_s_br returns "13/12/2007"<br/>
<br/>
Date.valid?("2007/01/02") returns true<br/>
Date.valid?("13/12/2007") returns true<br/>
<br/>
Date.valid?("13/12/200A") returns false<br/>
Date.valid?("00/00/0000") returns false<br/>
Para ver os usos da parte de dinheiro recomendo olhar o arquivo dinheiro_test.<br/>
<br/>
<pre>
"832.to_extenso => #{832.to_extenso}"
"125623.to_extenso => #{125623.to_extenso}"
"1_968_854_823.to_extenso => #{1_968_854_823.to_extenso}"
"45_233_968_854_823.to_extenso => #{45_233_968_854_823.to_extenso}"
"1230.to_extenso_real => #{1230.to_extenso_real}"
"1230.95.to_extenso_real => #{1230.95.to_extenso_real}"
"1.50.to_extenso_real => #{1.50.to_extenso_real}"
"832.01.to_extenso_real => #{832.01.to_extenso_real}"
</pre>
<br/>
<pre>
'maria de andrade dos santos e silva'.nome_proprio() => 'Maria de Andrade dos Santos e Silva'
'este texto está com acentuação'.remover_acentos => 'este texto esta com acentuacao'
</pre>