Available options for grain in period()

#1

In c3ShowType(ExpressionEngineFunction), the doc for period() is

period(number, grain): int

What are the available options for grain?

0 Likes

#2

I believe the term ‘grain’ was deprecated in favor of ‘interval’ (c3ShowType(EvaluateSpec) and search for grain).

So the options for grain are the same as c3ShowType(Interval):
SECOND
MINUTE
FIVE_MINUTE
TEN_MINUTE
QUARTER_HOUR
HALF_HOUR
HOUR
DAY
MONTH
YEAR

1 Like