日期/时间格式
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
在酒店广告 XML 消息和 Feed 中使用以下日期/时间格式。
日期
日期采用以下格式表示:
YYYY-MM-DD
YYYY
:以四位数字表示的年份
MM
:月份(两位数)
DD
:两位数的日期
示例:2017-12-31
(2017 年 12 月 31 日)。
YearlessDate
不含年份的日期表示每年发生的日期事件,采用以下格式:
MM-DD
示例:12-31
(12 月 31 日)。
DateTime
DateTime 使用 RFC 3339 格式:
YYYY-MM-DDTHH:mm[:ss.SSS]+|-HH:mm[Z]
YYYY
:以四位数字表示的年份
MM
:月份(两位数)
DD
:两位数的日期
T
:用于将日期与时间分隔开来
HH
:小时
mm
:分钟
ss
:(可选)秒
SSS
:(可选)毫秒
+|-
:将日期和时间与时区偏移量分隔开来
HH:mm
:时区偏移量的小时和分钟
Z
:(可选)零偏移
示例:2017-12-31T16:20:00-04:00
。
您还可以为时区偏移量指定 Z
,表示偏移量为零。
时间
时间的格式为:
HH:MM[:SS]
示例:16:20:00
或 16:20
。
时间以关联媒体资源的本地时区显示。
保留所有权利。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eHotel Ads XML messages and feeds use specific formats for Date, YearlessDate, DateTime, and Time.\u003c/p\u003e\n"],["\u003cp\u003eDates are expressed as YYYY-MM-DD (e.g., 2017-12-31), while YearlessDates omit the year, using MM-DD (e.g., 12-31).\u003c/p\u003e\n"],["\u003cp\u003eDateTime follows the RFC 3339 format, YYYY-MM-DDTHH:mm[:ss.SSS]+|-HH:mm[Z], including timezone offsets.\u003c/p\u003e\n"],["\u003cp\u003eTime is represented as HH:MM[:SS] (e.g., 16:20:00 or 16:20) and is interpreted in the property's local time zone.\u003c/p\u003e\n"]]],[],null,["# Date/Time Formats\n\nUse the following date/time formats in the Hotel Ads XML messages and feeds.\n\nDate\n----\n\nDates are expressed in the following format: \n\n YYYY-MM-DD\n\n- `YYYY`: Four-digit year\n- `MM`: Two-digit month\n- `DD`: Two-digit day\n\nExample: `2017-12-31` for December 31st, 2017.\n\nYearlessDate\n------------\n\nYearless dates express a date event that occurs every year, and are expressed in\nthe following format: \n\n MM-DD\n\n- `MM`: Two-digit month\n- `DD`: Two-digit day\n\nExample: `12-31` for December 31st.\n\nDateTime\n--------\n\nDateTime uses the [RFC 3339](//www.ietf.org/rfc/rfc3339.txt) format: \n\n YYYY-MM-DDTHH:mm[:ss.SSS]+\\|-HH:mm[Z]\n\n- `YYYY`: Four-digit year\n- `MM`: Two-digit month\n- `DD`: Two-digit day\n- *T*: Separates the date from the time\n- `HH`: Hours\n- `mm`: Minutes\n- `ss`: (Optional) Seconds\n- `SSS`: (Optional) Milliseconds\n- *+|-*: Separates the date and time from the timezone offset\n- `HH:mm`: Hours and minutes in the timezone offset\n- *Z*: (Optional) Zero offset\n\nExample: `2017-12-31T16:20:00-04:00`.\n\nYou can also specify `Z` for the timezone offset, which indicates zero offset.\n\nTime\n----\n\nTime is expressed in the format: \n\n HH:MM[:SS]\n\n- `HH`: Hours\n- `MM`: Minutes\n- `SS`: (Optional) Seconds\n\nExample: `16:20:00` or `16:20`.\n\nTimes are interpreted in the local time zone of the associated property."]]