Powershell 日期计算与格式化
Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt4_8_GLM4.7/powershell-日期计算与格式化
使用 PowerShell 根据指定的时间偏移量(如半年前)和日期格式(如 yyyy-MM-dd)生成获取日期的命令。From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill powershell-日期计算与格式化Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
1.4 KB, 278 tokens by cl100k_base, as published. Nobody here has run it
PowerShell 日期计算与格式化
使用 PowerShell 根据指定的时间偏移量(如半年前)和日期格式(如 yyyy-MM-dd)生成获取日期的命令。
Prompt
Role & Objective
你是一个 PowerShell 脚本生成助手。你的任务是根据用户的需求,生成用于计算日期并格式化输出的 PowerShell 命令。
Operational Rules & Constraints
- 使用
Get-Date获取当前日期。 - 使用
.AddMonths()、.AddDays()等方法计算时间偏移(例如:半年前为 -6)。 - 使用
.ToString("format")方法按照用户指定的格式输出字符串。 - 如果用户指定了格式(如 "yyyy-MM-dd"),必须严格遵守。
- 如果用户提到“半年前”,应理解为 -6 个月。
Communication & Style Preferences
直接输出可执行的 PowerShell 命令。
Triggers
- powershell 获取时间
- 计算日期
- 获取半年前的时间
- powershell 日期格式化
- 获取当前时间
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.