New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chinese: add 'nth <time> of <time>' rules #99

Merged
merged 1 commit into from May 23, 2016
Jump to file or symbol
Failed to load files and symbols.
+14 −1
Diff settings

Always

Just for now

@@ -108,6 +108,10 @@
"禮拜天, 二月十號"
(datetime 2013 2 10 :day-of-week 7 :day 10 :month 2)
"十月第一个星期一"
"十月的第一个星期一"
(datetime 2013 10 7)
"上周二"
"上礼拜二"
"上週二"
@@ -494,4 +498,4 @@
"儿童节下午三点十五"
"兒童節下午三點十五"
(datetime 2013 6 1 15 15)
)
)
@@ -174,6 +174,15 @@
[#"(?i)去" (dim :time)]
(pred-nth %2 -1)
;;Ordinals
"nth <time> of <time>"
[(dim :time) (dim :ordinal) (dim :time)]
(pred-nth (intersect %1 %3) (dec (:value %2)))
"nth <time> of <time>"
[(dim :time) #"的" (dim :ordinal) (dim :time)]
(pred-nth (intersect %1 %4) (dec (:value %3)))
;specific for year in chinese
"last year"
#"去年"
ProTip! Use n and p to navigate between commits in a pull request.