如何计算日出和日落之间的持续时间?

发布于 2024-09-12 20:38:17 字数 167 浏览 1 评论 0原文

  1. 我的问题是如何计算日出和日落之间的持续时间?
  2. 那么我怎样才能将这个持续时间(日出到日落)分成8等份(小时:分钟)?

我所需要的只是每个部分的开始和结束时间。我想在 VB.NET 中编写这段代码 因为在VB.NET中我可以轻松地设计GUI。

谢谢

  1. My question is How can i calculate time duration between sunrise and sunset?
  2. Then how can i divide this duration(sunrise to sunset) into 8 equal parts(Hr: Min)?

All i need is starting and ending time of every part. And i want to write this code in VB.NET
because in VB.NET i can easily design the GUI.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

酒绊 2024-09-19 20:38:18

快速搜索“sunrise VB.NET”会得到一些结果,例如这个< /a>.

A quick search for "sunrise VB.NET" came up with a few results, such as this one.

爱的故事 2024-09-19 20:38:18

您可以使用时间跨度。添加日出和日落,然后使用 timespan.Seconds、timespan.Hours 等
要将其分为 8 等份,只需使用 timespan.Seconds / 8,然后将其计算为小时、分钟和秒。

如果您还没有日出和日落时间,您可以使用此项目来计算它:http://www.codeproject.com/KB/cs/SunTime.aspx

You can use TimeSpan. Add the sunrise and sunset to it, and then use timespan.Seconds, timespan.Hours etc
To devide it into 8 equal parts, just use timespan.Seconds / 8 and then calculate that into hours, minutes and seconds

If you don't already have the sunrise and sunset time, you can use this project to calculate it: http://www.codeproject.com/KB/cs/SunTime.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文