nuance_CALENDARX
Defines a discrete calendar event in terms of date, time, or both. Additionally, the calendar event may be in absolute or relative terms. Named holidays are also represented.
Note:
Mix.dialog does not support the nuance_CALENDARX predefined entity. If you would like to let users provide either a date or a time, as a single conversation turn, use separate DATE and TIME entities. See Predefined entities in Mix.dialog.Sample language
- February 14
- at 5
- yesterday
- between the first of June and the second of August
- from Monday to Friday
- two weeks after Easter
- Monday night
- Christmas
Examples
Responses for the above samples are shown below.
Example: February 14
{
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_ABS": {
"nuance_DAY": 14,
"nuance_MONTH": 2
}
}
}
}
Example: at 5
{
"nuance_CALENDAR": {
"nuance_TIME": {
"nuance_TIME_ABS": {
"nuance_HOUR": 5
}
}
}
}
Example: yesterday
{
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_REL": {
"nuance_STEP": "day",
"nuance_INCREMENT": -1
}
}
}
}
Example: between the first of June and the second of August
{
"nuance_CALENDAR_RANGE": {
"nuance_CALENDAR_RANGE_START": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_ABS": {
"nuance_DAY": 1,
"nuance_MONTH": 6
}
}
}
},
"nuance_CALENDAR_RANGE_END": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_ABS": {
"nuance_DAY": 2,
"nuance_MONTH": 8
}
}
}
}
}
}
Example: from Monday to Friday
{
"nuance_CALENDAR_RANGE": {
"nuance_CALENDAR_RANGE_START": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_REL": {
"nuance_INCREMENT": 0,
"nuance_DAY_OF_WEEK": 2
}
}
}
},
"nuance_CALENDAR_RANGE_END": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_REL": {
"nuance_INCREMENT": 0,
"nuance_DAY_OF_WEEK": 6
}
}
}
}
}
}
Example: two days after Easter
{
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_REL": {
"nuance_STEP": "day",
"nuance_INCREMENT": 2,
"nuance_DATE_ANCHOR": {
"nuance_DATE": {
"nuance_DATE_ABS": {
"nuance_NAMED_DAY": "Easter"
}
}
}
}
}
}
}
Example: Monday night
{
"nuance_CALENDAR_RANGE": {
"nuance_CALENDAR_RANGE_END": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_REL": {
"nuance_INCREMENT": 0,
"nuance_DAY_OF_WEEK": 3
}
},
"nuance_TIME": {
"nuance_TIME_ABS": {
"nuance_HOUR": 3,
"nuance_MINUTE": 59,
"nuance_AMPM": "am",
"nuance_MODIFIER": "fuzzy"
}
}
}
},
"nuance_CALENDAR_RANGE_START": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_REL": {
"nuance_INCREMENT": 0,
"nuance_DAY_OF_WEEK": 2
}
},
"nuance_TIME": {
"nuance_TIME_ABS": {
"nuance_HOUR": 10,
"nuance_AMPM": "pm",
"nuance_MODIFIER": "fuzzy"
}
}
}
}
}
}
Example: Christmas
{
"nuance_CALENDAR":
{
"nuance_DATE": {
"nuance_DATE_ABS": {
"nuance_DAY": 25,
"nuance_MONTH":12,
"nuance_HOLIDAY":"Christmas"
}
}
}
}
New for v9.x and v10.x
Example: from June 15 to July 10
{
"nuance_CALENDAR_RANGE": {
"nuance_CALENDAR_RANGE_START": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_ABS": {
"nuance_DAY": 15,
"nuance_MONTH": 6
}
}
}
},
"nuance_CALENDAR_RANGE_END": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_ABS": {
"nuance_DAY": 10,
"nuance_MONTH": 7
}
}
}
}
}
}
Example: now
{
"nuance_CALENDAR": {
"nuance_TIME": {
"nuance_TIME_REL": {
"nuance_STEP": "hour",
"nuance_INCREMENT": 0
}
}
}
}
Example: ten hours from now
{
"nuance_CALENDAR": {
"nuance_TIME": {
"nuance_TIME_REL": {
"nuance_STEP": "hour",
"nuance_INCREMENT": 10
}
}
}
}
Example: between nine am and six pm
{
"nuance_CALENDAR_RANGE": {
"nuance_CALENDAR_RANGE_START": {
"nuance_CALENDAR": {
"nuance_TIME": {
"nuance_TIME_ABS": {
"nuance_HOUR": 9,
"nuance_AMPM": "am"
}
}
}
},
"nuance_CALENDAR_RANGE_END": {
"nuance_CALENDAR": {
"nuance_TIME": {
"nuance_TIME_ABS": {
"nuance_HOUR": 6,
"nuance_AMPM": "pm"
}
}
}
}
}
}
Example: today/today’s/todays
{
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_REL": {
"nuance_STEP": "day",
"nuance_INCREMENT": 0
}
}
}
}
Example: from today 17:30 till tomorrow 13:30
{
"nuance_CALENDAR_RANGE": {
"nuance_CALENDAR_RANGE_START": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_REL": {
"nuance_STEP": "day",
"nuance_INCREMENT": 0
}
},
"nuance_TIME": {
"nuance_TIME_ABS": {
"nuance_HOUR": 5,
"nuance_MINUTE": 30,
"nuance_AMPM": "pm"
}
}
}
},
"nuance_CALENDAR_RANGE_END": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_REL": {
"nuance_STEP": "nuance_day",
"nuance_INCREMENT": 1
}
},
"nuance_TIME": {
"nuance_TIME_ABS": {
"nuance_HOUR": 1,
"nuance_MINUTE": 30,
"nuance_AMPM": "pm"
}
}
}
}
}
}
New in v10.x
Example (10.x only): from november to march
{
"nuance_CALENDAR_RANGE": {
"nuance_CALENDAR_RANGE_START": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_ABS": {
"nuance_MONTH": 11
}
}
}
},
"nuance_CALENDAR_RANGE_END": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_ABS": {
"nuance_MONTH": 3
}
}
}
}
}
}
Example (10.x only): november 2014 to march 2015
{
"nuance_CALENDAR_RANGE": {
"nuance_CALENDAR_RANGE_START": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_ABS": {
"nuance_MONTH": 11,
"nuance_YEAR": 2014
}
}
}
},
"nuance_CALENDAR_RANGE_END": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_ABS": {
"nuance_MONTH": 3,
"nuance_YEAR": 2015
}
}
}
}
}
}
Example (10.x only): from 2014 to 2015
{
"nuance_CALENDAR_RANGE": {
"nuance_CALENDAR_RANGE_START": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_ABS": {
"nuance_YEAR": 2014
}
}
}
},
"nuance_CALENDAR_RANGE_END": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_ABS": {
"nuance_YEAR": 2015
}
}
}
}
}
}
Example (10.x only): till next year
{
"nuance_CALENDAR_RANGE": {
"nuance_CALENDAR_RANGE_END": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_REL": {
"nuance_STEP": "year",
"nuance_INCREMENT": 1
}
}
}
}
}
}
Example (10.x only): at the beginning of last week
{
"nuance_CALENDAR_RANGE": {
"nuance_CALENDAR_RANGE_START": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_REL": {
"nuance_DAY_OF_WEEK": 1,
"nuance_INCREMENT": -1
}
}
}
},
"nuance_CALENDAR_RANGE_END": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_REL": {
"nuance_DAY_OF_WEEK": 3,
"nuance_INCREMENT": -1
}
}
}
}
}
}
Example (10.x only): at the middle of this month
{
"nuance_CALENDAR_RANGE": {
"nuance_CALENDAR_RANGE_START": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_ABS": {
"nuance_DAY": 10
},
"nuance_DATE_REL": {
"nuance_STEP": "month",
"nuance_INCREMENT": 0
}
}
}
},
"nuance_CALENDAR_RANGE_END": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_ABS": {
"nuance_DAY": 20
},
"nuance_DATE_REL": {
"nuance_STEP": "month",
"nuance_INCREMENT": 0
}
}
}
}
}
}
Example (10.x only): second week of 2020
{
"nuance_CALENDAR_RANGE": {
"nuance_CALENDAR_RANGE_START": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_ABS": {
"nuance_DAY": 8,
"nuance_MONTH": 1,
"nuance_YEAR": 2020,
"nuance_MODIFIER": "fuzzy"
}
}
}
},
"nuance_CALENDAR_RANGE_END": {
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_REL": {
"nuance_STEP": "week",
"nuance_INCREMENT": 1,
"nuance_DATE_ANCHOR": {
"nuance_DATE": {
"nuance_DATE_ABS": {
"nuance_DAY": 8,
"nuance_MONTH": 1,
"nuance_YEAR": 2020,
"nuance_MODIFIER": "fuzzy"
}
}
}
}
}
}
}
}
}
Example (10.x only): next year on june first
{
"nuance_CALENDAR": {
"nuance_DATE": {
"nuance_DATE_ABS": {
"nuance_DAY": 1,
"nuance_MONTH": 6
},
"nuance_DATE_REL": {
"nuance_STEP": "year",
"nuance_INCREMENT": 1
}
}
}
}
Numeric value range
-
For nuance_CALENDARX, nuance_DATE_REL, nuance_TIME_REL: <= 120. (Note that this grammar also covers Arabic numbers. For example, “in 120 hours”.)
-
For nuance_YEAR: 1900-2050 (as Arabic numbers in GrXML for English and as compounds for de-de).
Changes between 6.x and 9.x for nuance_CALENDARX
-
nuance_TIME_ANCHOR was added to the definition of nuance_TIME_REL
-
nuance_DATE_ANCHOR was added to the definition of nuance_DATE_REL
-
CALENDARX property was renamed to nuance_CALENDARX
-
DATE/last/this+‘night’ meaning changed so that ’night’ ends at 3:59 am the next day
-
nuance_HOLIDAY was added to some dates. See the example above.
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {
"__main__.TimeAbs": {
"type": "object",
"properties": {
"nuance_TIME_ABS": {
"type": "object",
"properties": {
"nuance_AMPM": {
"type": "string",
"pattern": "[am|pm]"
},
"nuance_MINUTE": {
"type": "number"
},
"nuance_HOUR": {
"type": "number"
},
"nuance_MODIFIER": {
"type": "string",
"pattern": "[fuzzy]"
}
}
}
},
"additionalProperties": false
},
"__main__.TimeRel": {
"type": "object",
"properties": {
"nuance_TIME_REL": {
"type": "object",
"properties": {
"nuance_INCREMENT": {
"type": "number"
},
"nuance_STEP": {
"type": "string",
"pattern": "[hour|minute]"
},
"nuance_MODIFIER": {
"type": "string",
"pattern": "[fuzzy]"
},
"nuance_TIME_ANCHOR": {
"$ref": "#/definitions/__main__.Time"
}
}
}
},
"additionalProperties": false
},
"__main__.DateAbs": {
"type": "object",
"properties": {
"nuance_DATE_ABS": {
"type": "object",
"properties": {
"nuance_DAY": {
"type": "number"
},
"nuance_MONTH": {
"type": "number"
},
"nuance_YEAR": {
"type": "number"
},
"nuance_MODIFIER": {
"type": "string",
"pattern": "[fuzzy]"
}
}
}
},
"additionalProperties": false
},
"__main__.DateRel": {
"type": "object",
"properties": {
"nuance_DATE_REL": {
"type": "object",
"properties": {
"nuance_NAMED_DAY": {
"type": "string"
},
"nuance_DAY_OF_WEEK": {
"type": "number",
"pattern": "[1-7]"
},
"nuance_INCREMENT": {
"type": "number"
},
"nuance_STEP": {
"type": "string",
"pattern": "[day|week|month|year]"
},
"nuance_MODIFIER": {
"type": "string",
"pattern": "[fuzzy]"
},
"nuance_DATE_ANCHOR": {
"$ref": "#/definitions/__main__.Date"
}
}
}
},
"additionalProperties": false
},
"__main__.Date": {
"type": "object",
"properties": {
"nuance_DATE": {
"anyOf": [{
"$ref": "#/definitions/__main__.DateAbs"
}, {
"$ref": "#/definitions/__main__.DateRel"
}
]
}
},
"additionalProperties": false
},
"__main__.Time": {
"type": "object",
"properties": {
"nuance_TIME": {
"anyOf": [{
"$ref": "#/definitions/__main__.TimeAbs"
}, {
"$ref": "#/definitions/__main__.TimeRel"
}
]
}
},
"additionalProperties": false
},
"__main__.CalendarRange": {
"type": "object",
"properties": {
"nuance_CALENDAR_RANGE_START": {
"nuance_CALENDAR": {
"anyOf": [{
"$ref": "#/definitions/__main__.Date"
}, {
"$ref": "#/definitions/__main__.Time"
}
]
}
},
"nuance_CALENDAR_RANGE_END": {
"nuance_CALENDAR": {
"anyOf": [{
"$ref": "#/definitions/__main__.Date"
}, {
"$ref": "#/definitions/__main__.Time"
}
]
}
}
},
"additionalProperties": false
}
},
"type": "object",
"properties": {
"nuance_CALENDARX": {
"type": "object",
"properties": {
"oneOf": [{
"nuance_CALENDAR": {
"anyOf": [{
"$ref": "#/definitions/__main__.Date"
}, {
"$ref": "#/definitions/__main__.Time"
}
]
},
"nuance_CALENDAR_RANGE": {
"$ref": "#/definitions/__main__.CalendarRange"
}
}
]
}
}
},
"additionalProperties": false
}
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.