Skip to content

PeriodType ​

Type
Abstract Class
Namespace
craft\enums
Inherits
craft\enums\PeriodType
Since
2.0.0

The PeriodType class is an abstract class that defines the various time period lengths that are available in Craft.

This class is a poor man's version of an enum, since PHP does not have support for native enumerations.

View source

Constants ​

ConstantDescription
Days
Hours
Minutes
Months
Seconds
Weeks
Years