Example #1
0
 public static Span DayOrTime(DateTime dayStart, IList<Token> timeTokens,
     Options options)
 {
     var outerSpan = new Span(dayStart, dayStart.AddDays(1));
     if (timeTokens.Count > 0)
     {
         options.Clock = () => outerSpan.Start.Value;
         var time = timeTokens
             .DealiasAndDisambiguateTimes(options)
             .GetAnchor(options);
         return time;
     }
     return outerSpan;
 }
Example #2
0
 public Span Handle(IList<Token> tokens, Options options)
 {
     var ddTokens = tokens.DealiasAndDisambiguateTimes(options);
     return ddTokens.GetAnchor(options);
 }