modify-date

The modify-date operation adjusts a given date according to a modification string and returns the result in ISO 8601 format (Y-m-d\TH:i:sP).

How it works

  • Input – a valid date string (e.g. 2024-02-21 15:30:00).
  • Modification string – defines the relative change to apply. Common examples:
    • +1 day → adds one day
    • -2 hours → subtracts two hours
    • +1 month → adds one month
    • next Monday → shifts to the next Monday
  • Output – the modified date, returned in ISO 8601 format (e.g. 2024-02-22T15:30:00+00:00).
  • If the input cannot be parsed as a valid date, the original value is returned unchanged.

You can also use data placeholders inside the modification string (e.g. {days}), which will be replaced by values from other fields.

Examples

InputModificationOutput
2024-02-21 15:30:00+1 day2024-02-22T15:30:00+00:00
2024-02-21-2 months2023-12-21T00:00:00+00:00
2024-02-21next Monday2024-02-26T00:00:00+00:00
invalid date+1 dayinvalid date

Usage in PalDock

Use modify-date when you need to:

  • Shift dates relative to a given point (e.g. “+30 days” for expiry).
  • Normalize all dates into ISO 8601 format before sending to APIs.
  • Automate scheduling based on relative expressions (“next Monday”, “last day of this month”).
  • Adjust imported dates into different time frames.

Best Practices

  • Always use clear relative formats (+1 day, -2 months) for predictable results.
  • Be careful with month modifications (+1 month, -1 month) as they depend on the number of days in the month.
  • Ensure all outputs are in ISO 8601 to maximize compatibility across systems.
  • Validate inputs before applying modification to avoid passing through unmodified invalid values.

References

Insights that
helps you grow

  • Platform Pick 1: Win Stakeholder Support
    Feeling like your affiliate marketing channel needs a boost, or you don’t have one yet? You’re on the right track! The first step is getting…
  • How to: Defining Goals and Expectations
    Defining goals and expectations is a fundamental step in managing an affiliate program. Setting clear goals and understanding what you want to achieve through the…
  • How to: Motivating and Rewarding Partners
    Motivating and rewarding your affiliate partners is essential for their engagement, activity, and long-term collaboration. Proper motivation and rewards can encourage your partners to put…

Dominate Your Industry