DateTime
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
نمایندگی JSON |
---|
{
"date": string
} |
فیلدها |
---|
date | string تاریخ/زمان با فرمت توسعه یافته ISO 8601. افست ممکن است مورد نیاز باشد یا نباشد (به مستندات فیلد والد مراجعه کنید). زمان ممکن است با دقت نانوثانیه مشخص شود. افست ها ممکن است با دقت ثانیه مشخص شوند (حتی اگر ثانیه های افست بخشی از ISO 8601 نیست). به عنوان مثال: 1985-04-12T23:20:50.52Z 20 دقیقه و 50.52 ثانیه بعد از ساعت 23 12 آوریل 1985 در UTC خواهد بود. 1985-04-12T19:20:50.52-04:00 20 دقیقه و 50.52 ثانیه بعد از ساعت 19 12 آوریل 1985، 4 ساعت قبل از UTC (همان لحظه ای در زمان مثال بالا) خواهد بود. اگر تاریخ/زمان برای یک مکان فیزیکی در نیویورک در نظر گرفته شده باشد، این معادل ساعت روشنایی روز شرقی (EDT) خواهد بود. به یاد داشته باشید که افست در مناطقی که ساعت تابستانی (یا تابستان) را رعایت می کنند، بسته به زمان سال متفاوت است. 1985-04-12T19:20:50.52 20 دقیقه و 50.52 ثانیه بعد از ساعت 19 12 آوریل 1985 بدون اطلاعات افست خواهد بود. ارائه یک افست این را به یک لحظه مطلق در زمان در سراسر جهان تبدیل می کند. تاریخ/زمان بر اساس منطقه زمانی کاربر تنظیم می شود. به عنوان مثال، زمان 2018-06-19T18:30:00-04:00 برای یک کاربر در نیویورک ساعت 18:30:00 و برای کاربر در لس آنجلس ساعت 15:30:00 خواهد بود. حذف افست باعث می شود این تاریخ/زمان محلی باشد که نشان دهنده چندین لحظه در زمان در سراسر جهان است. تاریخ/زمان همیشه در منطقه زمانی فعلی کاربر خواهد بود. به عنوان مثال، زمان 2018-06-19T18:30:00 برای یک کاربر در نیویورک ساعت 18:30:00 و همچنین برای کاربر در لس آنجلس ساعت 18:30 خواهد بود. این زمانی مفید است که تاریخ/زمان محلی یکسان باید برای بسیاری از مکانهای فیزیکی در چندین منطقه زمانی اعمال شود. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThe JSON schema represents a date object.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edate\u003c/code\u003e field is a string that adheres to the ISO 8601 extended format for date and time.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edate\u003c/code\u003e field can include an offset to specify the time zone, or it can be omitted for local time representation.\u003c/p\u003e\n"],["\u003cp\u003eProviding an offset ensures the \u003ccode\u003edate\u003c/code\u003e represents a specific instant in time globally, while omitting it makes it a local time subject to user time zones.\u003c/p\u003e\n"]]],["The core information defines the `date` field within a JSON structure. The `date` is a string representing an ISO 8601 date/time, with optional offset information. It may include nanosecond precision. Providing an offset creates an absolute instant in time, adjusted to the user's timezone. Omitting the offset creates a local date/time, consistent across time zones. This format can represent times down to the nanosecond and offsets with second precision.\n"],null,["# DateTime\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\n| JSON representation |\n|----------------------------|\n| ``` { \"date\": string } ``` |\n\n| Fields ||\n|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `date` | `string` An ISO 8601 extended format date/time. Offset may or may not be required (refer to the parent field's documentation). Time may be specified up to nanosecond precision. Offsets may be specified with seconds precision (even though offset seconds is not part of ISO 8601). For example: `1985-04-12T23:20:50.52Z` would be 20 minutes and 50.52 seconds after the 23rd hour of April 12th, 1985 in UTC. `1985-04-12T19:20:50.52-04:00` would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985, 4 hours before UTC (same instant in time as the above example). If the date/time is intended for a physical location in New York, this would be the equivalent of Eastern Daylight Time (EDT). Remember that offset varies in regions that observe Daylight Saving Time (or Summer Time), depending on the time of the year. `1985-04-12T19:20:50.52` would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985 with no offset information. Providing an offset makes this an absolute instant in time around the world. The date/time will be adjusted based on the user's time zone. For example, a time of `2018-06-19T18:30:00-04:00` will be 18:30:00 for a user in New York and 15:30:00 for a user in Los Angeles. Omitting the offset makes this a local date/time, representing several instants in time around the world. The date/time will always be in the user's current time zone. For example, a time of `2018-06-19T18:30:00` will be 18:30:00 for a user in New York and also 18:30:00 for a user in Los Angeles. This is useful when the same local date/time should apply to many physical locations across several time zones. |"]]