Voting helps other researchers find interesting modules.
For a more detailed presentation on what's a fetching operation, see go/datetime-meaning-schemas. Examples to illustrate how the proto is used: I. Fetching day-of-weeks: a) query: "1st 2 Mondays of April" proto: ordinal: 1 target {weekday: MONDAY} count: 2 range: {begin {year: RESOLVED_YEAR month: APRIL day: 1} {end {year: RESOLVED_YEAR month: APRIL day: 30} b) query: "1st and last Monday of April" proto: ordinal: 1 ordinal: -1 target {weekday: MONDAY} range: {begin {year: RESOLVED_YEAR month: APRIL day: 1} {end {year: RESOLVED_YEAR month: APRIL day: 30} c) query: "next Monday" proto: ordinal: 1 target {weekday: MONDAY} d) query: "last 2 Mondays" proto: ordinal: -1 count: 2 target {weekday: MONDAY} e) query: "this Monday" proto: ordinal: 0 target {weekday: MONDAY} f) query: "the monday after next" proto: ordinal: 2 target {weekday: MONDAY} g) query: "third Monday in April" proto: ordinal: 3 target {weekday: MONDAY} range: {begin {year: RESOLVED_YEAR month: APRIL day: 1} {end {year: RESOLVED_YEAR month: APRIL day: 30} h) query: "the monday before last" proto: ordinal: -2 target {weekday: MONDAY} i) query: "the second to the last monday in April" proto: ordinal: -2 target {weekday: MONDAY} range: {begin {year: RESOLVED_YEAR month: APRIL day: 1} {end {year: RESOLVED_YEAR month: APRIL day: 30} II. Fetching date/time unit: a) query: "1st 2 weeks of April" proto: ordinal: 1 target {unit: WEEK} count: 2 range: {begin {year: RESOLVED_YEAR month: APRIL day: 1} {end {year: RESOLVED_YEAR month: APRIL day: 30} b) query: "1st and last week of April" proto: ordinal: 1 ordinal: -1 target {unit: WEEK} range: {begin {year: RESOLVED_YEAR month: APRIL day: 1} {end {year: RESOLVED_YEAR month: APRIL day: 30} c) query: "next year" proto: ordinal: 1 target {unit: YEAR} d) query: "last 2 weeks" proto: ordinal: -1 count: 2 target {unit: WEEK} e) query: "this month" proto: ordinal: 0 target {unit: MONTH} f) query: "the week after next" proto: ordinal: 2 target {unit: WEEK} g) query: "third week in April" proto: ordinal: 3 target {unit: WEEK} range: {begin {year: RESOLVED_YEAR month: APRIL day: 1} {end {year: RESOLVED_YEAR month: APRIL day: 30} h) query: "the week before last" proto: ordinal: -2 target {unit: WEEK} i) query: "the second to the last week in April" proto: ordinal: -2 target {unit: WEEK} range: {begin {year: RESOLVED_YEAR month: APRIL day: 1} {end {year: RESOLVED_YEAR month: APRIL day: 30} Next field: 9
baseType
String.t
nil
count
integer()
metadata
ordinal
list(integer())
range
GoogleApi.ContentWarehouse.V1.Model.NlpSemanticParsingDatetimeRange.t
rangeModifier
relativeRange
GoogleApi.ContentWarehouse.V1.Model.NlpSemanticParsingDatetimeResolutionProperties.t
target
GoogleApi.ContentWarehouse.V1.Model.NlpSemanticParsingDatetimeTargetToFetch.t
Unwrap a decoded JSON object into its complex fields.
@type t() :: %GoogleApi.ContentWarehouse.V1.Model.NlpSemanticParsingDatetimeFetchedRelativeDateTime{ baseType: String.t() | nil, count: integer() | nil, metadata: String.t() | nil, ordinal: [integer()] | nil, range: GoogleApi.ContentWarehouse.V1.Model.NlpSemanticParsingDatetimeRange.t() | nil, rangeModifier: String.t() | nil, relativeRange: GoogleApi.ContentWarehouse.V1.Model.NlpSemanticParsingDatetimeResolutionProperties.t() | nil, target: GoogleApi.ContentWarehouse.V1.Model.NlpSemanticParsingDatetimeTargetToFetch.t() | nil }
@spec decode(struct(), keyword()) :: struct()