I have created a function language
which returns English
or French
. I would like to create a function that would give the date now based on a select language. For instance, if I select French
, the function will return Jeudi, 28 mars 2017
or if I select English
, it will return Tuesday March 28 2017
.
@property
def date_customerprofile(self):
now = datetime.date.today()
if language == 'English'
date = now.strftime("%A, %B %d %Y")
else:
date = ...
Could anyone be able to help me to finish this function to get such results?
Thanks!
P.S. Knowing that months in French are Janvier
, Février
, Mars
, Avril
, Mai
, Juin
, Juillet
, Août
, Septembre
, Octobre
, Novembre
and Décembre
. Days of week are Dimanche
(Sunday), Lundi
, Mardi
, Mercredi
, Jeudi
, Vendredi
and Samedi