Format for specifying Date Interval - maneeshpal/Drata GitHub Wiki

Drata uses a special format to specify date intervals in order to simplify the way you can communicate them when building a widget.

This format is used when specifying date interval when Grouping data on charts, and when specifying a dynamic date range.

h => hour, m => minute, s => second, w => week, d => day

Examples:
format resolution Description
1h2m 1 hour + 2 minutes
1d2h3m5s 1 day + 2 hours + 3 minutes + 5 seconds
1y 365 days (this does not resolve to 1 calendar year)
1w 7 days
2w 14 days
week a calendar week Data is grouped by 1 week intervals starting Sunday and ending on Saturday of a calendar week
month calendar month Grouped by Jan, Feb, March ...etc. You cannot do 1month, 2month ...
quarter 3 calendar months 12 calendar months of a year are grouped into 4 month intervals. Jan, Feb, March being first Quarter, April, May, June being second Quarter, July, Aug, Sept being 3rd Quarter, Oct, Nov, Dec being the last 4th Quarter
year calendar year Data is grouped by calendar year. If you need to group by a certain number of years, you need to use 1y, 2y ..etc. You cannot do 2year, 3year...
⚠️ **GitHub.com Fallback** ⚠️