# Google Cloud Compute V1 API - Class Google::Cloud::Compute::V1::Date (v3.7.0)

3.7.0 (latest) 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.22.0 2.21.1 2.20.0 2.19.1 2.18.0 2.17.0 2.16.0 2.15.0 2.14.0 2.13.0 2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.2 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.10.0 1.9.0 1.8.0 1.7.1 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0 0.5.0 Reference documentation and code samples for the Google Cloud Compute V1 API class Google::Cloud::Compute::V1::Date.

Represents a whole or partial calendar date, such as a birthday. The time of
day and time zone are either specified elsewhere or are insignificant. The
date is relative to the Gregorian Calendar. This can represent one of the
following:

- A full date, with non-zero year, month, and day values.
- A month and day, with a zero year (for example, an anniversary).
- A year on its own, with a zero month and a zero day.
- A year and month, with a zero day (for example, a credit card expiration date).

Related types:

- google.type.TimeOfDay
- google.type.DateTime
- google.protobuf.Timestamp

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #day

    def day() -> ::Integer

**Returns**

- (::Integer) --- Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

### #day=

    def day=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
**Returns**

- (::Integer) --- Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

### #month

    def month() -> ::Integer

**Returns**

- (::Integer) --- Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

### #month=

    def month=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
**Returns**

- (::Integer) --- Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

### #year

    def year() -> ::Integer

**Returns**

- (::Integer) --- Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

### #year=

    def year=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
**Returns**

- (::Integer) --- Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.