Date function missing
Opened this issue · 2 comments
FabienGiely commented
We should add a "nlg_date" function, witch have default behaviors depending on language
printfhere commented
Maybe we should add something like this:
if platform.system() == "Windows":
date_format = "%A %#d %B %Y"
locale.setlocale(locale.LC_TIME, 'fr')
else:
date_format = "%A %-d %B %Y"
locale.setlocale(locale.LC_TIME, 'fr_FR.utf8')
day, month, year = (int(x) for x in date.split('/'))
date = datetime.date(year, month, day)
FabienGiely commented
I think it's more about changing the format of a date (from the input for example) than getting the system date. But maybe we can have both.