Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

メニュー

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Twilio.DATE

The Twilio.DATE built-in field enables Autopilot to understand dates expressed by users in different formats and forms. It converts words that describe a date into ISO-8601 date format.

Absolute Dates

Absolute dates are converted from natural language input to the standard date format.

Example input Example Output
December 25th 2018 2018-12-25
October 1st, 2019 2019-10-01
December 24th, 1992 1992-12-24

Relative Dates

Relative dates have the following properties:

  • Future dates are implied by default when missing the year or month.
  • UTC is used as the base time zone.

Below are some examples of relative dates. For the examples, we provide the current input, the current date when the input is evaluated and the example output.

Example input Current Date Example Output 注釈
December 25th 10/10/2018 2018-12-25 The year is 2018 because December 25th, 2018 is the next occurrence of such date after the current date (10/10/2018).
October 1st 10/10/2018 2019-10-01 The year is 2019 because October 1st, 2019 is the next occurrence of such date after the current date (10/10/2018).
Today 10/10/2018 2018-10-10 Note that this takes the current date in UTC time.
Thursday 10/10/2018 2018-10-11 Since the current date (10/10/2018) was a Wednesday, the next Thursday would be the day after.
Monday 10/10/2018 2018-10-15 Since the current date (10/10/2018) was a Wednesday, the next Monday would be October 15, 2018.
Yesterday 10/10/2018 2018-10-09 Note that this takes the current date in UTC time.
Tomorrow 10/10/2018 2018-10-11 Note that this takes the current date in UTC time.
Next year 10/10/2018 2018-10-10 Note that this takes the current date in UTC time.

Rate this page:

ヘルプが必要ですか?

誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。