时间跨度和日期时间计算

时间跨度和日期时间计算

本文介绍了时间跨度和日期时间计算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我有一个问题,也许经验丰富的程序员可以为我提供帮助.
示例:如果一列火车在下午4:00离开纽约,并在晚上11时到达芝加哥,则行程多长时间.
(容易的部分)但是关键在于:晚上有几个小时和几分钟,白天有几个小时和分钟.您需要考虑它所跨越的时区以及每个城市的官方日落和日出.
他是我要完成的目标的要旨.我有一个asp.net函数,可以告诉我每个城市处于哪个时区,以及每个城市那天的太阳何时升起和落下.现在我要完成的就是这个.我正在尝试开发一个函数,该函数可以告诉我白天在小时和分钟内在火车上停留了多少时间,而后又告诉我晚上在火车上停留了多少时间.有人有想法么???有没有人听说过任何可以完成此功能的功能或JavaScript ??
提前谢谢.

Hello Everyone,
I have a question that maybe an experienced programmer can help me with.
Example: If a train left NY at 4:00PM and Arrived in Chicago at 11PM How long was the trip.
(Easy part) But here the clincher: and how many hours and minutes were at night and how many hours and minutes were during the day. You will need to take into consideration the time zones it crosses and the official sunset and sunrise for each city.
He is the gist of what I am trying to accomplish. I have a asp.net function that can tell me what time-zone each city is in and when the sun rise and sets for that day for each city. Now what I am trying to accomplish is this. I am trying to develop a function that will tell me how much time I was on the train during the day hours and minutes and then how much time I was on the train at night. Anyone have any ideas??? Has anyone heard of any function or javascript out there that would accomplish this???
Thanks In advance.

推荐答案


这篇关于时间跨度和日期时间计算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 10:07