Blame view

天文台pc/tianwentai-ui/node_modules/date-fns/parse/_lib/Parser.mjs 487 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
  import { ValueSetter } from "./Setter.mjs";
  
  export class Parser {
    run(dateString, token, match, options) {
      const result = this.parse(dateString, token, match, options);
      if (!result) {
        return null;
      }
  
      return {
        setter: new ValueSetter(
          result.value,
          this.validate,
          this.set,
          this.priority,
          this.subPriority,
        ),
        rest: result.rest,
      };
    }
  
    validate(_utcDate, _value, _options) {
      return true;
    }
  }