core-nlg icon indicating copy to clipboard operation
core-nlg copied to clipboard

Date function missing

Open FabienGiely opened this issue 6 years ago • 2 comments

We should add a "nlg_date" function, witch have default behaviors depending on language

FabienGiely avatar Nov 08 '19 10:11 FabienGiely

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)

printfhere avatar Nov 08 '19 11:11 printfhere

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.

FabienGiely avatar Nov 08 '19 11:11 FabienGiely