Context API reference

The API property of the context object provides number of convenience methods for generating and manipulating values.

List of methods:

 {context.API.range(context.API.timestamp(-30,'days'),context.API.timestamp(), 'days')}. This example generates list of dates between today and the date 30 days ago.

.replace(year=2022, month=11, day=23) - substitute specific components of a given datetime with new values. Whether it's the year, month, or any other aspect

.format(formatstring) - offers a comprehensive set of formatting tokens for versatile datetime representation. These include options for:
1. year in both 4-digit and 2-digit formats (YYYY and YY),
2. month representations (MMMM, MMM, MM, M),
3. day configurations (DDDD, DDD, DD, D, Do),
4. day of the week indications (dddd, ddd, d),
5. ISO week dates (W),
6. hours in 24-hour and 12-hour formats (HH, H, hh, h),
7. AM/PM indicators (A, a),
8. minutes (mm, m),
9. seconds (ss, s),
10. sub-seconds (S...),
11. timezone information (ZZZ, ZZ, Z)
12. timestamps in both seconds (X) and milliseconds/microseconds (x).

.isoformat() - formats your datetime as YYYY-MM-DD HH:mm:ss, ensuring consistency and compatibility.

.int_timestamp - Retrieve an integer timestamp effortlessly with this property.

.datetime - property grants access to the unadulterated datetime object.