首页 > 解决方案 > In ISO 8601 does 'P1D' mean midnight tonight? 24 hours from now? Midnight tomorrow night?

问题描述

I have a virtual assistant app that includes a task manager. Some 'daily' tasks (like 'Check the mail' need to drop off at midnight so they don't clutter up the task list.

We use ISO 8601 to control how long until the task falls off the list.

I've looked all over trying to get clarity on the definition of a "D" day. For example: Does P1D mean 24 hours? Midnight tomorrow? Midnight tonight?

I'm trying to achieve midnight tonight.

标签: iso8601

解决方案


这是一个间隔,而不是一天中的特定时间,因此没有起点就毫无意义。

因此,在这种情况下,这可能意味着任务在完成 24 小时后被丢弃。


推荐阅读