69ef2c427191461911772ce90cbaac2aa21e5f9d,pythainlp/util/date.py,,thai_day2datetime,#Any#Any#,423
Before Change
date = datetime.now()
day_num = 0
if day in DAY_0:
day_num = 0
elif day in DAY_PLUS_1:
day_num = 1
elif day in DAY_PLUS_2:
day_num = 2
elif day in DAY_MINUS_1:
day_num = -1
elif day in DAY_MINUS_2:
day_num = -2
else:
raise NotImplementedError
return date + datetime.timedelta(days=day_num)
After Change
DEPRECATED: Please use thaiword_to_date().
warnings.warn(
"thai_day2datetime is deprecated, use thaiword_to_date instead",
DeprecationWarning,
)
return thaiword_to_date(day, date)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: PyThaiNLP/pythainlp
Commit Name: 69ef2c427191461911772ce90cbaac2aa21e5f9d
Time: 2020-05-23
Author: arthit@gmail.com
File Name: pythainlp/util/date.py
Class Name:
Method Name: thai_day2datetime
Project Name: taehoonlee/tensornets
Commit Name: 7e569f461b1638f3a7d0d2b825699745df876b68
Time: 2018-04-10
Author: me@taehoonlee.com
File Name: tensornets/pretrained.py
Class Name:
Method Name: direct
Project Name: PyThaiNLP/pythainlp
Commit Name: ebcc42fe046d3126ea1cd0370ca76194d489c8eb
Time: 2019-10-07
Author: arthit@gmail.com
File Name: pythainlp/util/thaiwordcheck.py
Class Name:
Method Name: thaicheck