Date.quarter

Date.quarter

Date.quarter

功能

读取当前 Date 所在季度。

语法

参数

无参数。

返回值

类型说明
Int返回 1 到 4 的季度序号。

代码示例

注意事项

  • 季度按月份计算:1-3 月为 1,4-6 月为 2,7-9 月为 3,10-12 月为 4。