refactor folders py 3
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from normalizer import Normalizer
|
||||
from common.normalizer import Normalizer
|
||||
from common.tokenizer import *
|
||||
import jalali
|
||||
from common.jalali import Gregorian,Persian
|
||||
import re
|
||||
import sys
|
||||
from re import sub
|
||||
@@ -376,7 +376,7 @@ def jdate2timestamp_old(dt):
|
||||
ndt = dt.replace("y", "")
|
||||
ndt = ndt.replace("m", "/")
|
||||
ndt = ndt.replace("d", "/")
|
||||
gd = jalali.Persian(ndt).gregorian_datetime()
|
||||
gd = Persian(ndt).gregorian_datetime()
|
||||
# print(gd)
|
||||
ztime = datetime.time(0, 0, 0, 0)
|
||||
gdt = datetime.datetime.combine(gd, ztime)
|
||||
@@ -389,7 +389,7 @@ def jdate2timestamp(dt):
|
||||
ndt = dt.replace("y", "")
|
||||
ndt = ndt.replace("m", "/")
|
||||
ndt = ndt.replace("d", "/")
|
||||
gd = jalali.Persian(ndt).gregorian_datetime()
|
||||
gd = Persian(ndt).gregorian_datetime()
|
||||
base = datetime.date(1970, 1, 1)
|
||||
rr = (gd-base).total_seconds()
|
||||
tst = int( round(rr) * 1000)
|
||||
|
||||
Reference in New Issue
Block a user