Date.today.strftime("%A") returns “Monday”, what can I do to get “Lunes”
(in spanish).
Im using Windows 7 with Ruby 1.9.2, my regional settings are set to
“Spanish Mexico”.
Thank you.
Date.today.strftime("%A") returns “Monday”, what can I do to get “Lunes”
(in spanish).
Im using Windows 7 with Ruby 1.9.2, my regional settings are set to
“Spanish Mexico”.
Thank you.
On Tue, Feb 1, 2011 at 10:04 AM, Ramsees R. [email protected]
wrote:
Date.today.strftime(“%A”) returns “Monday”, what can I do to get “Lunes”
(in spanish).Im using Windows 7 with Ruby 1.9.2, my regional settings are set to
“Spanish Mexico”.Thank you.
If nothing better comes along, you could try something like this.
require ‘date’
h = {“Monday” => “Lunes”,“Tuesday” => “Martes”,“Sunday” => “Domingo”}
p h[Date.today.strftime(“%A”)]
Harry
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs