รูปแบบวันที่/เวลา
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ใช้รูปแบบวันที่/เวลาต่อไปนี้ในฟีดและข้อความ XML ของ Hotel Ads
วันที่
วันที่จะแสดงในรูปแบบต่อไปนี้
YYYY-MM-DD
YYYY
: ปีแบบ 4 หลัก
MM
: เดือนแบบ 2 หลัก
DD
: วันที่แบบ 2 หลัก
ตัวอย่างเช่น 2017-12-31
สำหรับวันที่ 31 ธันวาคม 2017
YearlessDate
วันที่ที่ไม่มีปีแสดงถึงวันที่ของเหตุการณ์ที่เกิดขึ้นทุกปี และแสดงในรูปแบบต่อไปนี้
MM-DD
MM
: เดือนแบบ 2 หลัก
DD
: วันที่แบบ 2 หลัก
ตัวอย่างเช่น 12-31
สำหรับวันที่ 31 ธันวาคม
DateTime
DateTime จะใช้รูปแบบ RFC 3339 ดังนี้
YYYY-MM-DDTHH:mm[:ss.SSS]+|-HH:mm[Z]
YYYY
: ปีแบบ 4 หลัก
MM
: เดือนแบบ 2 หลัก
DD
: วันที่แบบ 2 หลัก
T
: แยกวันที่กับเวลา
HH
: ชั่วโมง
mm
: นาที
ss
: (ไม่บังคับ) วินาที
SSS
: (ไม่บังคับ) มิลลิวินาที
+|-
: แยกวันที่และเวลาออกจากออฟเซ็ตเขตเวลา
HH:mm
: ชั่วโมงและนาทีในออฟเซ็ตเขตเวลา
Z
: (ไม่บังคับ) ออฟเซ็ตเป็นศูนย์
ตัวอย่าง: 2017-12-31T16:20:00-04:00
นอกจากนี้ คุณยังระบุ Z
สำหรับออฟเซ็ตเขตเวลาได้ด้วย โดยจะแสดงออฟเซ็ตเป็น 0
เวลา
เวลาจะแสดงในรูปแบบต่อไปนี้
HH:MM[:SS]
HH
: ชั่วโมง
MM
: นาที
SS
: (ไม่บังคับ) วินาที
เช่น 16:20:00
หรือ 16:20
ระบบจะตีความเวลาตามเขตเวลาท้องถิ่นของพร็อพเพอร์ตี้ที่เกี่ยวข้อง
สงวนลิขสิทธิ์ Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\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."]]