The "date" filter in Mechanic Liquid now supports these additional options:
  • beginning_of_year, end_of_year
  • beginning_of_quarter, end_of_quarter
  • beginning_of_month, end_of_month
  • beginning_of_week, end_of_week
  • beginning_of_day, middle_of_day, end_of_day
  • advance
The "advance" option is worth special mention: it allows for timezone-aware date calculations that start from any provided time (or from
"now"
). The date value may be advanced positively or negatively, using any combination of years, months, weeks, days, hours, minutes, and seconds. Years, months, weeks, and days are all treated as variable-length intervals, appropriate for the relevant timezone.
With this change, the "date" filter no longer requires a format argument. If one is not provided, the filter outputs the date formatted per ISO8601.
This extension came straight out of the Futures board. Thanks Brad!
Read more