Skip to content
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

[DUCK] 支持"工作日[每天]三点"的说法 #224

Merged
merged 1 commit into from
Jun 13, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ trait Rules extends DimRules with LazyLogging {

val ruleWorkDays = Rule(
name = "<work/non-workday>",
pattern = List("(每一?个)?(工作日|非工作日|节假日)".regex),
pattern = List("(每一?个)?(工作日|非工作日|节假日)(每天)?".regex),
prod = regexMatch { case _ :: _ :: t :: _ =>
val workdayType = t match {
case "工作日" => WorkdayType.Workday
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ object Examples extends DimExamples {
(RepeatValue(DurationData(1, Week), start = (ymd(d = 13), Some(form.DayOfWeek))), List("每周三", "每个星期三")),
(RepeatValue(DurationData(1, Day), start = (h(8), Some(form.TimeOfDay(Some(8), false)))), List("每天上午八点", "每个上午八点")),
(RepeatValue(workdayType = NonWorkday), List("非工作日", "节假日")),
(RepeatValue(workdayType = Workday, start = (yMdHms(d = 13, H = 3, grain = Hour), Some(form.TimeOfDay(Some(3), false)))), List("工作日三点", "每个工作日三点")),
(RepeatValue(workdayType = Workday, start = (yMdHms(d = 13, H = 3, grain = Hour), Some(form.TimeOfDay(Some(3), false)))), List("工作日三点", "工作日每天三点", "每个工作日三点")),
(RepeatValue(workdayType = Workday, start = (datetimeInterval(
new DuckDateTime(LocalDateTime.of(2013, 2, 12, 8, 0, 0)),
new DuckDateTime(LocalDateTime.of(2013, 2, 12, 12, 0, 0)),
Expand Down
Loading