Skip to content

Commit

Permalink
支持"工作日[每天]三点"的说法 (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
du00cs authored Jun 13, 2024
1 parent ad9b1a3 commit 8959819
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit 8959819

Please sign in to comment.