import datetime import calendar import locale def getDayDescription(thisLocale): locale.setlocale(locale.LC_ALL, thisLocale) nw = datetime.datetime.now() tm = nw.strftime('%H:%M') h = nw.strftime('%H') m = nw.strftime('M') dy = nw.strftime('%d') yr = nw.strftime('%Y') mo = nw.strftime('%B') wd = calendar.day_name[nw.weekday()] dat = (wd + ' ' + dy + ' ' + mo + ' ' + yr) #.capitalize() return dat, tm dat, tm = getDayDescription('en-EN') print(dat, tm) # Same call, now with named arguments dat, tm = getDayDescription(thisLocale = 'en-EN') print(dat, tm)