1
我需要在波斯日期將''1396/4/28''轉換爲''1396/04/28''。如何在python中使用jalali date中的strftime?
代碼:
from service import jalali
now_date = datetime.datetime.now() // 2017-07-19 21:32:34.574369
date = now_date.strftime('%Y/%m/%d') // 2017-07-19
from_date = jalali.Gregorian(date).persian_string("{}/{}/{}") // '1396/4/28'
如何轉換 '' 1396年4月28日 '' 爲 '' 1396年4月28日'在波斯日期蟒蛇?