mirror of
https://github.com/facebook/duckling.git
synced 2024-12-26 05:33:24 +03:00
fb1dcaa138
Summary: * Moving `ruleNationalDay` from `ZH` rules to specific locales: `zh_CN`, `zh_HK`, `zh_MO` * Fixed National Day for `zh_TW`. Reviewed By: blandinw Differential Revision: D6057565 fbshipit-source-id: 8f9f2ab
36 lines
770 B
Haskell
36 lines
770 B
Haskell
-- Copyright (c) 2016-present, Facebook, Inc.
|
|
-- All rights reserved.
|
|
--
|
|
-- This source code is licensed under the BSD-style license found in the
|
|
-- LICENSE file in the root directory of this source tree. An additional grant
|
|
-- of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
|
|
{-# LANGUAGE GADTs #-}
|
|
{-# LANGUAGE NoRebindableSyntax #-}
|
|
{-# LANGUAGE OverloadedStrings #-}
|
|
|
|
module Duckling.Time.ZH.MO.Rules
|
|
( rules
|
|
) where
|
|
|
|
import Prelude
|
|
|
|
import Duckling.Regex.Types
|
|
import Duckling.Time.Helpers
|
|
import Duckling.Types
|
|
|
|
ruleNationalDay :: Rule
|
|
ruleNationalDay = Rule
|
|
{ name = "national day"
|
|
, pattern =
|
|
[ regex "(国庆|國慶)(节|節)?"
|
|
]
|
|
, prod = \_ -> tt $ monthDay 10 1
|
|
}
|
|
|
|
rules :: [Rule]
|
|
rules =
|
|
[ ruleNationalDay
|
|
]
|