Closed khafan246 closed 8 years ago
The idea is to keep the datetime
module function as they are in standard library.
Why don't you use locale to change the language?
I don't get your point, changing locale will not affect the output:
>>> import jdatetime
>>> print(print(jdatetime.datetime.now().strftime("%a, %d %b %Y %H:%M:%S")))
Yek, 05 Ord 1395 21:39:58
>>> import locale
>>> locale.setlocale(locale.LC_TIME, "fa_IR")
'fa_IR'
>>> print(print(jdatetime.datetime.now().strftime("%a, %d %b %Y %H:%M:%S")))
Yek, 05 Ord 1395 21:40:14
currently, the
strftime
depends ongetdefaultlocale
for language detection. but this will not cover many use cases. it would be good to be able to specify it manually.