日出日路,跟日期,经纬度有关,满足以一年为周期,正弦余弦函数.见下图:
在PHP 中date_sunrise和date_sunset函数分别获取日出日落.
date_sunrise(strtotime('日期'),SUNFUNCS_RET_STRING,$latitude,$longitude,$zenith,$gmtoffset); date_sunset(strtotime('日期'),SUNFUNCS_RET_STRING,$latitude,$longitude,$zenith,$gmtoffset);
日期 | 日出(最早4:59;最迟6:59) | 日落(最早16:55;最迟19:02) | 白天历时(小时) |
---|---|---|---|
2024-1-1 | 6:58 | 17:06 | 10.13 |
2024-1-2 | 6:58 | 17:07 | 10.15 |
2024-1-3 | 6:59 | 17:07 | 10.13 |
2024-1-4 | 6:59 | 17:08 | 10.15 |
2024-1-5 | 6:59 | 17:09 | 10.17 |
2024-1-6 | 6:59 | 17:10 | 10.18 |
2024-1-7 | 6:59 | 17:11 | 10.20 |
2024-1-8 | 6:59 | 17:11 | 10.20 |
2024-1-9 | 6:59 | 17:12 | 10.22 |
2024-1-10 | 6:59 | 17:13 | 10.23 |
2024-1-11 | 6:59 | 17:14 | 10.25 |
2024-1-12 | 6:59 | 17:15 | 10.27 |
2024-1-13 | 6:59 | 17:15 | 10.27 |
2024-1-14 | 6:59 | 17:16 | 10.28 |
2024-1-15 | 6:59 | 17:17 | 10.30 |
2024-1-16 | 6:59 | 17:18 | 10.32 |
2024-1-17 | 6:59 | 17:19 | 10.33 |
2024-1-18 | 6:58 | 17:20 | 10.37 |
2024-1-19 | 6:58 | 17:21 | 10.38 |
2024-1-20 | 6:58 | 17:21 | 10.38 |
2024-1-21 | 6:58 | 17:22 | 10.40 |
2024-1-22 | 6:57 | 17:23 | 10.43 |
2024-1-23 | 6:57 | 17:24 | 10.45 |
2024-1-24 | 6:57 | 17:25 | 10.47 |
2024-1-25 | 6:56 | 17:26 | 10.50 |
2024-1-26 | 6:56 | 17:27 | 10.52 |
2024-1-27 | 6:55 | 17:28 | 10.55 |
2024-1-28 | 6:55 | 17:28 | 10.55 |
2024-1-29 | 6:54 | 17:29 | 10.58 |
2024-1-30 | 6:54 | 17:30 | 10.60 |
2024-1-31 | 6:53 | 17:31 | 10.63 |
2024-2-1 | 6:53 | 17:32 | 10.65 |
2024-2-2 | 6:52 | 17:33 | 10.68 |
2024-2-3 | 6:51 | 17:34 | 10.72 |
2024-2-4 | 6:51 | 17:35 | 10.73 |
2024-2-5 | 6:50 | 17:35 | 10.75 |
2024-2-6 | 6:49 | 17:36 | 10.78 |
2024-2-7 | 6:49 | 17:37 | 10.80 |
2024-2-8 | 6:48 | 17:38 | 10.83 |
2024-2-9 | 6:47 | 17:39 | 10.87 |
2024-2-10 | 6:46 | 17:40 | 10.90 |
2024-2-11 | 6:46 | 17:41 | 10.92 |
2024-2-12 | 6:45 | 17:41 | 10.93 |
2024-2-13 | 6:44 | 17:42 | 10.97 |
2024-2-14 | 6:43 | 17:43 | 11.00 |
2024-2-15 | 6:42 | 17:44 | 11.03 |
2024-2-16 | 6:41 | 17:45 | 11.07 |
2024-2-17 | 6:40 | 17:45 | 11.08 |
2024-2-18 | 6:39 | 17:46 | 11.12 |
2024-2-19 | 6:39 | 17:47 | 11.13 |
2024-2-20 | 6:38 | 17:48 | 11.17 |
2024-2-21 | 6:37 | 17:48 | 11.18 |
2024-2-22 | 6:36 | 17:49 | 11.22 |
2024-2-23 | 6:35 | 17:50 | 11.25 |
2024-2-24 | 6:34 | 17:51 | 11.28 |
2024-2-25 | 6:33 | 17:51 | 11.30 |
2024-2-26 | 6:31 | 17:52 | 11.35 |
2024-2-27 | 6:30 | 17:53 | 11.38 |
2024-2-28 | 6:29 | 17:54 | 11.42 |
2024-2-29 | 6:28 | 17:54 | 11.43 |
2024-2-30 | 6:27 | 17:55 | 11.47 |
2024-3-1 | 6:27 | 17:55 | 11.47 |
2024-3-2 | 6:26 | 17:56 | 11.50 |
2024-3-3 | 6:25 | 17:57 | 11.53 |
2024-3-4 | 6:24 | 17:57 | 11.55 |
2024-3-5 | 6:23 | 17:58 | 11.58 |
2024-3-6 | 6:22 | 17:59 | 11.62 |
2024-3-7 | 6:20 | 17:59 | 11.65 |
2024-3-8 | 6:19 | 18:00 | 11.68 |
2024-3-9 | 6:18 | 18:01 | 11.72 |
2024-3-10 | 6:17 | 18:01 | 11.73 |
2024-3-11 | 6:16 | 18:02 | 11.77 |
2024-3-12 | 6:14 | 18:03 | 11.82 |
2024-3-13 | 6:13 | 18:03 | 11.83 |
2024-3-14 | 6:12 | 18:04 | 11.87 |
2024-3-15 | 6:11 | 18:05 | 11.90 |
2024-3-16 | 6:10 | 18:05 | 11.92 |
2024-3-17 | 6:08 | 18:06 | 11.97 |
2024-3-18 | 6:07 | 18:06 | 11.98 |
2024-3-19 | 6:06 | 18:07 | 12.02 |
2024-3-20 | 6:05 | 18:08 | 12.05 |
2024-3-21 | 6:04 | 18:08 | 12.07 |
2024-3-22 | 6:02 | 18:09 | 12.12 |
2024-3-23 | 6:01 | 18:10 | 12.15 |
2024-3-24 | 6:00 | 18:10 | 12.17 |
2024-3-25 | 5:59 | 18:11 | 12.20 |
2024-3-26 | 5:57 | 18:11 | 12.23 |
2024-3-27 | 5:56 | 18:12 | 12.27 |
2024-3-28 | 5:55 | 18:13 | 12.30 |
2024-3-29 | 5:54 | 18:13 | 12.32 |
2024-3-30 | 5:53 | 18:14 | 12.35 |
2024-3-31 | 5:51 | 18:14 | 12.38 |
2024-4-1 | 5:50 | 18:15 | 12.42 |
2024-4-2 | 5:49 | 18:16 | 12.45 |
2024-4-3 | 5:48 | 18:16 | 12.47 |
2024-4-4 | 5:47 | 18:17 | 12.50 |
2024-4-5 | 5:45 | 18:18 | 12.55 |
2024-4-6 | 5:44 | 18:18 | 12.57 |
2024-4-7 | 5:43 | 18:19 | 12.60 |
2024-4-8 | 5:42 | 18:19 | 12.62 |
2024-4-9 | 5:41 | 18:20 | 12.65 |
2024-4-10 | 5:40 | 18:21 | 12.68 |
2024-4-11 | 5:38 | 18:21 | 12.72 |
2024-4-12 | 5:37 | 18:22 | 12.75 |
2024-4-13 | 5:36 | 18:22 | 12.77 |
2024-4-14 | 5:35 | 18:23 | 12.80 |
2024-4-15 | 5:34 | 18:24 | 12.83 |
2024-4-16 | 5:33 | 18:24 | 12.85 |
2024-4-17 | 5:32 | 18:25 | 12.88 |
2024-4-18 | 5:31 | 18:26 | 12.92 |
2024-4-19 | 5:30 | 18:26 | 12.93 |
2024-4-20 | 5:29 | 18:27 | 12.97 |
2024-4-21 | 5:28 | 18:27 | 12.98 |
2024-4-22 | 5:27 | 18:28 | 13.02 |
2024-4-23 | 5:26 | 18:29 | 13.05 |
2024-4-24 | 5:25 | 18:29 | 13.07 |
2024-4-25 | 5:24 | 18:30 | 13.10 |
2024-4-26 | 5:23 | 18:31 | 13.13 |
2024-4-27 | 5:22 | 18:31 | 13.15 |
2024-4-28 | 5:21 | 18:32 | 13.18 |
2024-4-29 | 5:20 | 18:33 | 13.22 |
2024-4-30 | 5:19 | 18:33 | 13.23 |
2024-5-1 | 5:18 | 18:34 | 13.27 |
2024-5-2 | 5:17 | 18:35 | 13.30 |
2024-5-3 | 5:16 | 18:35 | 13.32 |
2024-5-4 | 5:15 | 18:36 | 13.35 |
2024-5-5 | 5:15 | 18:37 | 13.37 |
2024-5-6 | 5:14 | 18:37 | 13.38 |
2024-5-7 | 5:13 | 18:38 | 13.42 |
2024-5-8 | 5:12 | 18:38 | 13.43 |
2024-5-9 | 5:12 | 18:39 | 13.45 |
2024-5-10 | 5:11 | 18:40 | 13.48 |
2024-5-11 | 5:10 | 18:40 | 13.50 |
2024-5-12 | 5:09 | 18:41 | 13.53 |
2024-5-13 | 5:09 | 18:42 | 13.55 |
2024-5-14 | 5:08 | 18:42 | 13.57 |
2024-5-15 | 5:07 | 18:43 | 13.60 |
2024-5-16 | 5:07 | 18:44 | 13.62 |
2024-5-17 | 5:06 | 18:44 | 13.63 |
2024-5-18 | 5:06 | 18:45 | 13.65 |
2024-5-19 | 5:05 | 18:46 | 13.68 |
2024-5-20 | 5:05 | 18:46 | 13.68 |
2024-5-21 | 5:04 | 18:47 | 13.72 |
2024-5-22 | 5:04 | 18:47 | 13.72 |
2024-5-23 | 5:03 | 18:48 | 13.75 |
2024-5-24 | 5:03 | 18:49 | 13.77 |
2024-5-25 | 5:03 | 18:49 | 13.77 |
2024-5-26 | 5:02 | 18:50 | 13.80 |
2024-5-27 | 5:02 | 18:50 | 13.80 |
2024-5-28 | 5:02 | 18:51 | 13.82 |
2024-5-29 | 5:01 | 18:51 | 13.83 |
2024-5-30 | 5:01 | 18:52 | 13.85 |
2024-5-31 | 5:01 | 18:53 | 13.87 |
2024-6-1 | 5:00 | 18:53 | 13.88 |
2024-6-2 | 5:00 | 18:54 | 13.90 |
2024-6-3 | 5:00 | 18:54 | 13.90 |
2024-6-4 | 5:00 | 18:55 | 13.92 |
2024-6-5 | 5:00 | 18:55 | 13.92 |
2024-6-6 | 5:00 | 18:56 | 13.93 |
2024-6-7 | 5:00 | 18:56 | 13.93 |
2024-6-8 | 5:00 | 18:57 | 13.95 |
2024-6-9 | 5:00 | 18:57 | 13.95 |
2024-6-10 | 4:59 | 18:57 | 13.97 |
2024-6-11 | 4:59 | 18:58 | 13.98 |
2024-6-12 | 5:00 | 18:58 | 13.97 |
2024-6-13 | 5:00 | 18:59 | 13.98 |
2024-6-14 | 5:00 | 18:59 | 13.98 |
2024-6-15 | 5:00 | 18:59 | 13.98 |
2024-6-16 | 5:00 | 19:00 | 14.00 |
2024-6-17 | 5:00 | 19:00 | 14.00 |
2024-6-18 | 5:00 | 19:00 | 14.00 |
2024-6-19 | 5:00 | 19:00 | 14.00 |
2024-6-20 | 5:01 | 19:01 | 14.00 |
2024-6-21 | 5:01 | 19:01 | 14.00 |
2024-6-22 | 5:01 | 19:01 | 14.00 |
2024-6-23 | 5:01 | 19:01 | 14.00 |
2024-6-24 | 5:02 | 19:01 | 13.98 |
2024-6-25 | 5:02 | 19:01 | 13.98 |
2024-6-26 | 5:02 | 19:02 | 14.00 |
2024-6-27 | 5:02 | 19:02 | 14.00 |
2024-6-28 | 5:03 | 19:02 | 13.98 |
2024-6-29 | 5:03 | 19:02 | 13.98 |
2024-6-30 | 5:04 | 19:02 | 13.97 |
2024-7-1 | 5:04 | 19:02 | 13.97 |
2024-7-2 | 5:04 | 19:02 | 13.97 |
2024-7-3 | 5:05 | 19:02 | 13.95 |
2024-7-4 | 5:05 | 19:02 | 13.95 |
2024-7-5 | 5:06 | 19:02 | 13.93 |
2024-7-6 | 5:06 | 19:01 | 13.92 |
2024-7-7 | 5:07 | 19:01 | 13.90 |
2024-7-8 | 5:07 | 19:01 | 13.90 |
2024-7-9 | 5:07 | 19:01 | 13.90 |
2024-7-10 | 5:08 | 19:01 | 13.88 |
2024-7-11 | 5:08 | 19:00 | 13.87 |
2024-7-12 | 5:09 | 19:00 | 13.85 |
2024-7-13 | 5:10 | 19:00 | 13.83 |
2024-7-14 | 5:10 | 19:00 | 13.83 |
2024-7-15 | 5:11 | 18:59 | 13.80 |
2024-7-16 | 5:11 | 18:59 | 13.80 |
2024-7-17 | 5:12 | 18:59 | 13.78 |
2024-7-18 | 5:12 | 18:58 | 13.77 |
2024-7-19 | 5:13 | 18:58 | 13.75 |
2024-7-20 | 5:13 | 18:57 | 13.73 |
2024-7-21 | 5:14 | 18:57 | 13.72 |
2024-7-22 | 5:15 | 18:56 | 13.68 |
2024-7-23 | 5:15 | 18:56 | 13.68 |
2024-7-24 | 5:16 | 18:55 | 13.65 |
2024-7-25 | 5:16 | 18:55 | 13.65 |
2024-7-26 | 5:17 | 18:54 | 13.62 |
2024-7-27 | 5:18 | 18:53 | 13.58 |
2024-7-28 | 5:18 | 18:53 | 13.58 |
2024-7-29 | 5:19 | 18:52 | 13.55 |
2024-7-30 | 5:19 | 18:51 | 13.53 |
2024-7-31 | 5:20 | 18:51 | 13.52 |
2024-8-1 | 5:21 | 18:50 | 13.48 |
2024-8-2 | 5:21 | 18:49 | 13.47 |
2024-8-3 | 5:22 | 18:48 | 13.43 |
2024-8-4 | 5:22 | 18:48 | 13.43 |
2024-8-5 | 5:23 | 18:47 | 13.40 |
2024-8-6 | 5:24 | 18:46 | 13.37 |
2024-8-7 | 5:24 | 18:45 | 13.35 |
2024-8-8 | 5:25 | 18:44 | 13.32 |
2024-8-9 | 5:25 | 18:43 | 13.30 |
2024-8-10 | 5:26 | 18:42 | 13.27 |
2024-8-11 | 5:27 | 18:42 | 13.25 |
2024-8-12 | 5:27 | 18:41 | 13.23 |
2024-8-13 | 5:28 | 18:40 | 13.20 |
2024-8-14 | 5:28 | 18:39 | 13.18 |
2024-8-15 | 5:29 | 18:38 | 13.15 |
2024-8-16 | 5:30 | 18:37 | 13.12 |
2024-8-17 | 5:30 | 18:36 | 13.10 |
2024-8-18 | 5:31 | 18:35 | 13.07 |
2024-8-19 | 5:31 | 18:34 | 13.05 |
2024-8-20 | 5:32 | 18:33 | 13.02 |
2024-8-21 | 5:32 | 18:31 | 12.98 |
2024-8-22 | 5:33 | 18:30 | 12.95 |
2024-8-23 | 5:34 | 18:29 | 12.92 |
2024-8-24 | 5:34 | 18:28 | 12.90 |
2024-8-25 | 5:35 | 18:27 | 12.87 |
2024-8-26 | 5:35 | 18:26 | 12.85 |
2024-8-27 | 5:36 | 18:25 | 12.82 |
2024-8-28 | 5:36 | 18:24 | 12.80 |
2024-8-29 | 5:37 | 18:23 | 12.77 |
2024-8-30 | 5:37 | 18:21 | 12.73 |
2024-8-31 | 5:38 | 18:20 | 12.70 |
2024-9-1 | 5:39 | 18:19 | 12.67 |
2024-9-2 | 5:39 | 18:18 | 12.65 |
2024-9-3 | 5:40 | 18:17 | 12.62 |
2024-9-4 | 5:40 | 18:15 | 12.58 |
2024-9-5 | 5:41 | 18:14 | 12.55 |
2024-9-6 | 5:41 | 18:13 | 12.53 |
2024-9-7 | 5:42 | 18:12 | 12.50 |
2024-9-8 | 5:42 | 18:10 | 12.47 |
2024-9-9 | 5:43 | 18:09 | 12.43 |
2024-9-10 | 5:44 | 18:08 | 12.40 |
2024-9-11 | 5:44 | 18:07 | 12.38 |
2024-9-12 | 5:45 | 18:05 | 12.33 |
2024-9-13 | 5:45 | 18:04 | 12.32 |
2024-9-14 | 5:46 | 18:03 | 12.28 |
2024-9-15 | 5:46 | 18:02 | 12.27 |
2024-9-16 | 5:47 | 18:00 | 12.22 |
2024-9-17 | 5:47 | 17:59 | 12.20 |
2024-9-18 | 5:48 | 17:58 | 12.17 |
2024-9-19 | 5:48 | 17:57 | 12.15 |
2024-9-20 | 5:49 | 17:55 | 12.10 |
2024-9-21 | 5:50 | 17:54 | 12.07 |
2024-9-22 | 5:50 | 17:53 | 12.05 |
2024-9-23 | 5:51 | 17:52 | 12.02 |
2024-9-24 | 5:51 | 17:50 | 11.98 |
2024-9-25 | 5:52 | 17:49 | 11.95 |
2024-9-26 | 5:52 | 17:48 | 11.93 |
2024-9-27 | 5:53 | 17:47 | 11.90 |
2024-9-28 | 5:53 | 17:45 | 11.87 |
2024-9-29 | 5:54 | 17:44 | 11.83 |
2024-9-30 | 5:55 | 17:43 | 11.80 |
2024-10-1 | 5:55 | 17:42 | 11.78 |
2024-10-2 | 5:56 | 17:40 | 11.73 |
2024-10-3 | 5:56 | 17:39 | 11.72 |
2024-10-4 | 5:57 | 17:38 | 11.68 |
2024-10-5 | 5:58 | 17:37 | 11.65 |
2024-10-6 | 5:58 | 17:36 | 11.63 |
2024-10-7 | 5:59 | 17:34 | 11.58 |
2024-10-8 | 5:59 | 17:33 | 11.57 |
2024-10-9 | 6:00 | 17:32 | 11.53 |
2024-10-10 | 6:01 | 17:31 | 11.50 |
2024-10-11 | 6:01 | 17:30 | 11.48 |
2024-10-12 | 6:02 | 17:29 | 11.45 |
2024-10-13 | 6:03 | 17:27 | 11.40 |
2024-10-14 | 6:03 | 17:26 | 11.38 |
2024-10-15 | 6:04 | 17:25 | 11.35 |
2024-10-16 | 6:05 | 17:24 | 11.32 |
2024-10-17 | 6:05 | 17:23 | 11.30 |
2024-10-18 | 6:06 | 17:22 | 11.27 |
2024-10-19 | 6:07 | 17:21 | 11.23 |
2024-10-20 | 6:07 | 17:20 | 11.22 |
2024-10-21 | 6:08 | 17:19 | 11.18 |
2024-10-22 | 6:09 | 17:18 | 11.15 |
2024-10-23 | 6:09 | 17:17 | 11.13 |
2024-10-24 | 6:10 | 17:16 | 11.10 |
2024-10-25 | 6:11 | 17:15 | 11.07 |
2024-10-26 | 6:12 | 17:14 | 11.03 |
2024-10-27 | 6:12 | 17:13 | 11.02 |
2024-10-28 | 6:13 | 17:12 | 10.98 |
2024-10-29 | 6:14 | 17:11 | 10.95 |
2024-10-30 | 6:15 | 17:10 | 10.92 |
2024-10-31 | 6:15 | 17:10 | 10.92 |
2024-11-1 | 6:16 | 17:09 | 10.88 |
2024-11-2 | 6:17 | 17:08 | 10.85 |
2024-11-3 | 6:18 | 17:07 | 10.82 |
2024-11-4 | 6:19 | 17:06 | 10.78 |
2024-11-5 | 6:19 | 17:06 | 10.78 |
2024-11-6 | 6:20 | 17:05 | 10.75 |
2024-11-7 | 6:21 | 17:04 | 10.72 |
2024-11-8 | 6:22 | 17:03 | 10.68 |
2024-11-9 | 6:23 | 17:03 | 10.67 |
2024-11-10 | 6:23 | 17:02 | 10.65 |
2024-11-11 | 6:24 | 17:02 | 10.63 |
2024-11-12 | 6:25 | 17:01 | 10.60 |
2024-11-13 | 6:26 | 17:00 | 10.57 |
2024-11-14 | 6:27 | 17:00 | 10.55 |
2024-11-15 | 6:28 | 16:59 | 10.52 |
2024-11-16 | 6:28 | 16:59 | 10.52 |
2024-11-17 | 6:29 | 16:59 | 10.50 |
2024-11-18 | 6:30 | 16:58 | 10.47 |
2024-11-19 | 6:31 | 16:58 | 10.45 |
2024-11-20 | 6:32 | 16:57 | 10.42 |
2024-11-21 | 6:33 | 16:57 | 10.40 |
2024-11-22 | 6:34 | 16:57 | 10.38 |
2024-11-23 | 6:34 | 16:56 | 10.37 |
2024-11-24 | 6:35 | 16:56 | 10.35 |
2024-11-25 | 6:36 | 16:56 | 10.33 |
2024-11-26 | 6:37 | 16:56 | 10.32 |
2024-11-27 | 6:38 | 16:56 | 10.30 |
2024-11-28 | 6:39 | 16:55 | 10.27 |
2024-11-29 | 6:39 | 16:55 | 10.27 |
2024-11-30 | 6:40 | 16:55 | 10.25 |
2024-12-1 | 6:41 | 16:55 | 10.23 |
2024-12-2 | 6:42 | 16:55 | 10.22 |
2024-12-3 | 6:43 | 16:55 | 10.20 |
2024-12-4 | 6:43 | 16:55 | 10.20 |
2024-12-5 | 6:44 | 16:55 | 10.18 |
2024-12-6 | 6:45 | 16:55 | 10.17 |
2024-12-7 | 6:46 | 16:55 | 10.15 |
2024-12-8 | 6:46 | 16:56 | 10.17 |
2024-12-9 | 6:47 | 16:56 | 10.15 |
2024-12-10 | 6:48 | 16:56 | 10.13 |
2024-12-11 | 6:48 | 16:56 | 10.13 |
2024-12-12 | 6:49 | 16:56 | 10.12 |
2024-12-13 | 6:50 | 16:57 | 10.12 |
2024-12-14 | 6:50 | 16:57 | 10.12 |
2024-12-15 | 6:51 | 16:57 | 10.10 |
2024-12-16 | 6:52 | 16:58 | 10.10 |
2024-12-17 | 6:52 | 16:58 | 10.10 |
2024-12-18 | 6:53 | 16:58 | 10.08 |
2024-12-19 | 6:53 | 16:59 | 10.10 |
2024-12-20 | 6:54 | 16:59 | 10.08 |
2024-12-21 | 6:54 | 17:00 | 10.10 |
2024-12-22 | 6:55 | 17:00 | 10.08 |
2024-12-23 | 6:55 | 17:01 | 10.10 |
2024-12-24 | 6:56 | 17:01 | 10.08 |
2024-12-25 | 6:56 | 17:02 | 10.10 |
2024-12-26 | 6:57 | 17:03 | 10.10 |
2024-12-27 | 6:57 | 17:03 | 10.10 |
2024-12-28 | 6:57 | 17:04 | 10.12 |
2024-12-29 | 6:58 | 17:05 | 10.12 |
2024-12-30 | 6:58 | 17:05 | 10.12 |
2024-12-31 | 6:58 | 17:06 | 10.13 |
每一年的日出日落时间,相差不大, 将上面表格数据保存为json格式, 程序调用也是可行.
标签:10,12,17,16,18,2024,日出日落 From: https://www.cnblogs.com/zhouein/p/18356708