Date.today.strftime("%A")

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