Date and time information relative to current time #5

Open
opened 2025-09-02 11:14:37 +02:00 by ansv7779 · 0 comments
Owner

When adding mock data that includes time it is often desired to have something that happens today, tomorrow, or somewhere relative to "now".

For example if I'm making some kind of calendar that displays this weeks events I would like something today at 08:00, tomorrow at 13:00, and so on. Right now it is only possible to specify fixed dates which would require a fixed clock in the system so it all makes sense. However with a fixed clock it is not possible test stuff that requires time to pass.

If there was some placeholder that can be used to set the following;

  • Date and time: "now" +/- some fixed amount of time
  • Date and time: "now" +/- number of days at a fixed time
  • Date: "now" +/- number of days

Possible placeholders;

  • {datetime+2d4h30m}
  • {datetime+2d@13:00}
  • {date-4d}
When adding mock data that includes time it is often desired to have something that happens today, tomorrow, or somewhere relative to "now". For example if I'm making some kind of calendar that displays this weeks events I would like something today at 08:00, tomorrow at 13:00, and so on. Right now it is only possible to specify fixed dates which would require a fixed clock in the system so it all makes sense. However with a fixed clock it is not possible test stuff that requires time to pass. If there was some placeholder that can be used to set the following; * Date and time: "now" +/- some fixed amount of time * Date and time: "now" +/- number of days at a fixed time * Date: "now" +/- number of days Possible placeholders; * `{datetime+2d4h30m}` * `{datetime+2d@13:00}` * `{date-4d}`
Sign in to join this conversation.
No Label
No Milestone
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DMC/apimposter#5
No description provided.