Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions dateparser/data/date_translation_data/ko.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@
],
"relative-type": {
"0 day ago": [
"오늘"
"오늘",
"금일"
],
"0 hour ago": [
"현재 시간"
Expand All @@ -117,7 +118,8 @@
"올해"
],
"1 day ago": [
"어제"
"어제",
"작일"
],
"1 month ago": [
"지난달"
Expand All @@ -129,7 +131,8 @@
"작년"
],
"in 1 day": [
"내일"
"내일",
"명일"
],
"in 1 month": [
"다음 달"
Expand All @@ -152,7 +155,8 @@
"(\\d+[.,]?\\d*)분 전"
],
"\\1 month ago": [
"(\\d+[.,]?\\d*)개월 전"
"(\\d+[.,]?\\d*)개월 전",
"(\\d+[.,]?\\d*)달 전"
],
"\\1 second ago": [
"(\\d+[.,]?\\d*)초 전"
Expand All @@ -173,7 +177,8 @@
"(\\d+[.,]?\\d*)분 후"
],
"in \\1 month": [
"(\\d+[.,]?\\d*)개월 후"
"(\\d+[.,]?\\d*)개월 후",
"(\\d+[.,]?\\d*)달 후"
],
"in \\1 second": [
"(\\d+[.,]?\\d*)초 후"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
relative-type:
0 day ago:
- 금일
1 day ago:
- 작일
in 1 day:
- 명일

relative-type-regex:
\1 month ago:
- (\d+[.,]?\d*)달 전
in \1 month:
- (\d+[.,]?\d*)달 후

5 changes: 5 additions & 0 deletions tests/test_languages.py
Original file line number Diff line number Diff line change
Expand Up @@ -1681,6 +1681,11 @@ def test_translation(self, shortname, datetime_string, expected_translation):
param("ko", "2분 후", "in 2 minute"),
param("ko", "5년 전", "5 year ago"),
param("ko", "다음 달", "in 1 month"),
param("ko", "금일", "0 day ago"),
param("ko", "작일", "1 day ago"),
param("ko", "명일", "in 1 day"),
param("ko", "3달 전", "3 month ago"),
param("ko", "2달 후", "in 2 month"),
# ksb
param("ksb", "keloi", "in 1 day"),
param("ksb", "evi eo", "0 day ago"),
Expand Down