DateTimeRenderOption
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
日付を出力でどのようにレンダリングするかを決定します。
列挙型 |
SERIAL_NUMBER |
日付、時刻、日時、期間の各フィールドを、Lotus 1-2-3 で一般化された「シリアル番号」形式の倍精度数として出力するように指示します。値の整数部分(小数点の左側)は、1899 年 12 月 30 日からの日数をカウントします。小数部(小数点の右側)は、時刻を 1 日の小数としてカウントします。たとえば、1900 年 1 月 1 日の正午は 2.5 です。2 は 1899 年 12 月 30 日の 2 日後であるため、0.5 は正午が半日であるためです。1900 年 2 月 1 日午後 3 時は 33.625 です。これにより、1900 年はうるう年ではないと正しく扱われます。 |
FORMATTED_STRING |
日付、時刻、日時、時間フィールドを、指定された数値形式(スプレッドシートの言語 / 地域によって異なります)で文字列として出力するように指示します。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-03-21 UTC。
[null,null,["最終更新日 2025-03-21 UTC。"],[],[],null,["# DateTimeRenderOption\n\nDetermines how dates should be rendered in the output.\n\n| Enums ||\n|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `SERIAL_NUMBER` | Instructs date, time, datetime, and duration fields to be output as doubles in \"serial number\" format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it's 2 days after December 30th 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year. |\n| `FORMATTED_STRING` | Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which depends on the spreadsheet locale). |"]]