How to know the current quarter with date?

前端 未结 2 1743
有刺的猬
有刺的猬 2021-01-28 00:28

Is it possible to know the current quarter using Linux command line?

I didn\'t find a way to do it within the date man page.

2条回答
  •  感情败类
    2021-01-28 01:04

    The dates corresponding to the start and end of a fiscal quarter vary by country, as well by the nature of the entity doing the fiscal reporting (corporate/personal/government/other...); some companies also have alternate schedules. As such, there is no standard API for this. You will have to get the current month and date and compare it to the appropriate quarter start/end dates for the country and entity of interest. You can find the dates for some countries in wikipedia.

提交回复
热议问题