class Date extends Message

Represents a whole calendar date, e.g. date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the Proleptic Gregorian Calendar. The day may be 0 to represent a year and month where the day is not significant, e.g. credit card expiration date. The year may be 0 to represent a month and day independent of year, e.g. anniversary date. Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and google.protobuf.Timestamp.

Generated from protobuf message google.type.Date

Methods

__construct()

No description

int
getYear()

Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year.

$this
setYear(int $var)

Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year.

int
getMonth()

Month of year. Must be from 1 to 12.

$this
setMonth(int $var)

Month of year. Must be from 1 to 12.

int
getDay()

Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year/month where the day is not significant.

$this
setDay(int $var)

Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year/month where the day is not significant.

Details

at line 45
__construct()

at line 57
int getYear()

Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year.

Generated from protobuf field int32 year = 1;

Return Value

int

at line 70
$this setYear(int $var)

Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year.

Generated from protobuf field int32 year = 1;

Parameters

int $var

Return Value

$this

at line 84
int getMonth()

Month of year. Must be from 1 to 12.

Generated from protobuf field int32 month = 2;

Return Value

int

at line 96
$this setMonth(int $var)

Month of year. Must be from 1 to 12.

Generated from protobuf field int32 month = 2;

Parameters

int $var

Return Value

$this

at line 111
int getDay()

Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year/month where the day is not significant.

Generated from protobuf field int32 day = 3;

Return Value

int

at line 124
$this setDay(int $var)

Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year/month where the day is not significant.

Generated from protobuf field int32 day = 3;

Parameters

int $var

Return Value

$this