PPA Tools: Date
Summary
This module contains actions for dealing with dates & times.
Actions
ppa_tools.date.
add_delta
Create a future Date by adding days, hours, & minutes to a date & time.
If no date is supplied, the current date & time will be used.
All generated dates have a UTC timezome
Minimum Plugin Version: 7.0.0
Input
days: number of days to add (defaults to 0)
hours: number of hours to add (defaults to 0)
minutes: number of minutes to add (defaults to 0)
start_date: optional Date to use as the start point (defaults to current date & time)
Output
Example
1 2 3 |
|
ppa_tools.date.
from_string
Create a Date from a date & time string.
The date & time string must be in the following format:
hour:minute:second day/month/year
For example:
09:00:00 21/03/2022
All generated dates have a UTC timezome
Minimum Plugin Version: 7.0.0
Input
string: the date & time string
Output
Example
1 2 3 |
|
ppa_tools.date.
get_delta
Get the total number of seconds between two Dates.
Minimum Plugin Version: 7.0.0
Output
A dictionary containing the following keys:
-
total_seconds
-
total_minutes
These keys should be treated independently (total_minutes = total_seconds divided by 60).
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
ppa_tools.date.
now
Get the current UTC date & time.
Minimum Plugin Version: 3.0.0
Input
This action takes no inputs.
Output
A single Date dictionary.
Example
1 2 |
|