refactor folders py 3

This commit is contained in:
hsafaei
2025-09-02 13:04:48 +03:30
parent 5a6647bbf2
commit 4b449268d3
13 changed files with 21 additions and 11 deletions
+4 -4
View File
@@ -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)