mirror of
https://github.com/microsoft/semantic-kernel.git
synced 2026-10-12 02:19:06 +00:00
### Motivation and Context The change enables the planner to make use of time references like "last wednesday" or "three days ago" which currently cause issues. This enables better use of SequentialPlanner when servicing user intent. Issue: https://github.com/microsoft/semantic-kernel/issues/922 ### Description This adds two new functions to the core TimeSkill class in both .net and python. 1. DaysAgo(str days) - takes an argument representing a number of days and offsets it from the current date to return the resultant date as the answer. 2. LastMatchingDay(str dayName) - takes the name of a day of the week and works backwards from yesterday to give it the first matching date of that day (e.g. "last wednesday"). Currently it only works with English day names, and this is reflected in the prompt description. Simple unit tests are added for each function. Co-authored-by: Devis Lucato <[email protected]>