Hey guys, whats up?
Is there any way to format “City, Day… Month… Year” using os.date
([fmt [, t]])? Eg.: “São Paulo, 14 de maio de 2014”
Hey guys, whats up?
Is there any way to format “City, Day… Month… Year” using os.date
([fmt [, t]])? Eg.: “São Paulo, 14 de maio de 2014”
yes. google ‘lua format date time’, tap the first result, and you get all explanations there.
@erickyyamato Try this.
function setup()
print("Sao Paulo,"..os.date(" %d of %B of %Y"))
end
@erickyamato Here’s another way to do it.
function setup()
mth={"Janeiro","Fevereiro","Marco","Abril","Maio","Junho",
"Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"}
dt=os.date("*t")
print(string.format("Sao Paulo, %d of %s of %d",dt.day,mth[dt.month],dt.year))
end
@erikyamayo, interesting. I thought os.date pulled the data in the language and time zone of your iPad settings.