CalendarPeriod
in package
A `CalendarPeriod` represents the abstract concept of a time period that has a canonical start. Grammatically, "the start of the current `CalendarPeriod`." All calendar times begin at midnight UTC.
Protobuf type google.type.CalendarPeriod
Table of Contents
Constants
- CALENDAR_PERIOD_UNSPECIFIED = 0
- Undefined period, raises an error.
- DAY = 1
- A day.
- FORTNIGHT = 3
- A fortnight. The first calendar fortnight of the year begins at the start of week 1 according to [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
- HALF = 6
- A half-year. Half-years start on dates 1-Jan and 1-Jul.
- MONTH = 4
- A month.
- QUARTER = 5
- A quarter. Quarters start on dates 1-Jan, 1-Apr, 1-Jul, and 1-Oct of each year.
- WEEK = 2
- A week. Weeks begin on Monday, following [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
- YEAR = 7
- A year.
Properties
- $valueToName : mixed
Methods
Constants
CALENDAR_PERIOD_UNSPECIFIED
Undefined period, raises an error.
public
mixed
CALENDAR_PERIOD_UNSPECIFIED
= 0
Generated from protobuf enum CALENDAR_PERIOD_UNSPECIFIED = 0;
DAY
A day.
public
mixed
DAY
= 1
Generated from protobuf enum DAY = 1;
FORTNIGHT
A fortnight. The first calendar fortnight of the year begins at the start of week 1 according to [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
public
mixed
FORTNIGHT
= 3
Generated from protobuf enum FORTNIGHT = 3;
HALF
A half-year. Half-years start on dates 1-Jan and 1-Jul.
public
mixed
HALF
= 6
Generated from protobuf enum HALF = 6;
MONTH
A month.
public
mixed
MONTH
= 4
Generated from protobuf enum MONTH = 4;
QUARTER
A quarter. Quarters start on dates 1-Jan, 1-Apr, 1-Jul, and 1-Oct of each year.
public
mixed
QUARTER
= 5
Generated from protobuf enum QUARTER = 5;
WEEK
A week. Weeks begin on Monday, following [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
public
mixed
WEEK
= 2
Generated from protobuf enum WEEK = 2;
YEAR
A year.
public
mixed
YEAR
= 7
Generated from protobuf enum YEAR = 7;
Properties
$valueToName
private
static mixed
$valueToName
= [self::CALENDAR_PERIOD_UNSPECIFIED => 'CALENDAR_PERIOD_UNSPECIFIED', self::DAY => 'DAY', self::WEEK => 'WEEK', self::FORTNIGHT => 'FORTNIGHT', self::MONTH => 'MONTH', self::QUARTER => 'QUARTER', self::HALF => 'HALF', self::YEAR => 'YEAR']
Methods
name()
public
static name(mixed $value) : mixed
Parameters
- $value : mixed
value()
public
static value(mixed $name) : mixed
Parameters
- $name : mixed