DateTimeRenderOption
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
枚举 |
SERIAL_NUMBER |
指示将日期、时间、日期时间和时长字段输出为“序列号”格式的双精度值,这种格式由 Lotus 1-2-3 普及。值的整数部分(小数点左侧)用于计算自 1899 年 12 月 30 日以来的天数。小数部分(小数点右侧)会将时间计为一天中的一部分。例如,1900 年 1 月 1 日中午为 2.5,其中 2 表示 1899 年 12 月 30 日之后的 2 天,.5 表示中午是半天。1900 年 2 月 1 日下午 3 点的值为 33.625。这样,系统就会正确地将 1900 年视为非闰年。 |
FORMATTED_STRING |
指示将日期、时间、日期时间和时长字段输出为字符串,并采用给定数字格式(具体取决于电子表格的语言区域)。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-21。
[null,null,["最后更新时间 (UTC):2025-03-21。"],[],[],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). |"]]