semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

fixed missing today() in TimeSkill

Open BeanHsiang opened this issue 1 year ago • 3 comments

Motivation and Context

the method Today() in TimeSkill.cs and today() in TimeSkill.py was missing. Today must be an alias for Date.

Description

Add the method Today.

Contribution Checklist

  • [x] The code builds clean without any errors or warnings
  • [x] The PR follows SK Contribution Guidelines (https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
  • [x] The code follows the .NET coding conventions (https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions) verified with dotnet format
  • [x] All unit tests pass, and I have added new tests where possible
  • [ ] I didn't break anyone :smile:

BeanHsiang avatar Apr 21 '23 13:04 BeanHsiang

Instead of

    [SKFunction("Get the current date")]
    public string Today()
    {
        // Example: Sunday, 12 January, 2025
        return this.Date();
    }

You could just write

    [SKFunction("Get the current date")]
    public string Today() => Date();

MovGP0 avatar Apr 21 '23 14:04 MovGP0

that's better one.

BeanHsiang avatar Apr 21 '23 14:04 BeanHsiang

@lemillermicrosoft no change in any .md file, please help to pass markdown-link-check

BeanHsiang avatar Apr 21 '23 23:04 BeanHsiang