一键导入
date-time
Use this skill to determine the current date and time.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use this skill to determine the current date and time.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | date_time |
| description | Use this skill to determine the current date and time. |
This skill provides access to date-time facilities.
Use this skill when you need to know the current date and time or any part of that information, because:
Determine the current year, month, day, hour, minute, second, and microsecond, returned as a Python datetime.datetime object.
Parameters: None
Returns:
A Python datetime.datetime object with the current date and time.
Does the input datetime.datetime object correspond to a week day (Monday through Friday) or not?
Parameters:
a_date_time: A Python datetime.datetime object.Returns:
True if the input a_date_time corresponds to a weekday (Monday through Friday) or False, otherwise.
Format a datetime.datetime as a string.
Parameters:
a_date_time: A Python datetime.datetime object.output_format: An optional format str to use to format a string from the input a_date_time. If not provided, the default value of "%A, %B %d, %Y, at %I:%m %p" is used, corresponding to "day of the week, month day, year, at hour:minutes AM/PM", where the "hour" is based on a 12-hour clock.Returns:
A string representing the input a_date_time, formatted using the output_format string.
Parameters:
a_date: A Python datetime.date object.output_format: An optional format str to use to format a string from the date part of the input a_date_time. If not provided, the default value of "%A, %B %d, %Y" is used, corresponding to "day of the week, month day year".Returns:
A string representing the input datetime.date object, formatted using the output_format string.
Parameters:
a_time: A Python datetime.time object.output_format: An optional format str to use to format a string from the time part of the input a_time. If not provided, the default value of "%I:%m %p" is used, corresponding to "hour:minutes AM/PM", where the "hour" is based on a 12-hour clock.Returns:
A string representing the input datetime.time object, formatted using the output_format string.
Parse the input string that uses the ISO format and return the corresponding Python datetime.datetime object.
Parameters:
a_date_time_str: A string representing a date-time in ISO format.Returns:
A Python datetime.datetime object with the corresponding date and time.
Parse the input string using the specified format and return the corresponding Python datetime.datetime object.
Parameters:
a_date_time_str: A string representing a date-time.input_format: An optional format str to use to parse the input a_date_time_str string to create and return Python datetime.datetime object. If not provided, different formats are tried, including "%A, %B %d, %Y, at %I:%m %p", corresponding to "day of the week, month day, year, at hour:minutes AM/PM", where the "hour" is based on a 12-hour clock, as well as variations of that format that remove some of the parts.Returns:
A tuple. If successful, returns a Python datetime.datetime object parsed from the input string and an empty message string. If unsuccessful, returns None and an error message.
Parse the input string using the specified format and return the corresponding Python datetime.date object.
Parameters:
a_date_str: A string representing a date.input_format: An optional format str to use to parse the input a_date_str string to create and return Python datetime.date object. If not provided, different formats are tried, including "%A, %B %d, %Y", corresponding to "day of the week, month day, yearReturns:
A tuple. If successful, returns a Python datetime.date object parsed from the input string and an empty message string. If unsuccessful, returns None and an error message.
Parse the input string using the specified format and return the corresponding Python datetime.time object.
Parameters:
a_time_str: A string representing a time.input_format: An optional format str to use to parse the input a_time_str string to create and return Python datetime.time object. If not provided, different formats are tried, including "%I:%m %p", corresponding to "hour:minutes AM/PM", where the "hour" is based on a 12-hour clock, as well as variations of that format that remove some of the parts.Returns:
A tuple. If successful, returns a Python datetime.time object parsed from the input string and an empty message string. If unsuccessful, returns None and an error message.
Patient: "I would like to schedule an appointment for tomorrow."
Action: Use now to determine today's date and infer tomorrow's date, allowing other skills to use that information to manage appointments.
Patient: "I would like to schedule an appointment for next Tuesday."
Action: Use now to determine today's date and infer the date for next Tuesday, allowing other skills to use that information to manage appointments.
Patient: "I would like to schedule an appointment for this Tuesday."
Action: Use now to determine today's date and infer the date for next Tuesday, allowing other skills to use that information to manage appointments.
Patient: "I would like to schedule an appointment for April 10th."
Action: Use now to determine today's date and infer the full date for the next April 10th, allowing other skills to use that information to manage appointments.
Patient: "I would like to schedule an appointment for April 11th, 2027 at 1 PM."
Action: Use is_week_day to determine if April 11th, 2027 is a week day or not. If it is a week day, use other skills to manage appointments on that date.