/**
     * 获取今天是一年中的第几天
     * @param string $date
     * @return string
     */
    public static function getDays($date = '') {
        $now_date = $date !== '' ? $date : date('Y-m-d');
        $first_date = date('Y',strtotime($now_date)).'-01-01';
        $diff_times = strtotime($now_date) - strtotime($first_date);
        return MathUtil::div($diff_times , 86400,0) + 1;
    }

Tips: 1 号是第一天 ,2 号是第二天。

相关文章:

  • 2022-12-23
  • 2021-08-15
  • 2022-12-23
  • 2021-05-19
  • 2021-06-11
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2021-11-04
  • 2022-12-23
  • 2021-07-14
  • 2021-05-18
相关资源
相似解决方案