为什么 SYSTEMTIME::wDayOfWeek 以 0 开头表示星期日?
这里有人能告诉我为什么星期从 0 点开始,周日为 SYSTEM_TIME::wDayOfWeek 吗?在德国,一周从周一开始。但也许我忽略了对于其他文化来说一周是从周日开始的。
Can anyone here tell me why the week begins at 0 for sunday with SYSTEM_TIME::wDayOfWeek ? Here in Germany the week begins at monday. But maybe I'm missing that for other cultures the week begins at sunday.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
现代历法是由教皇格列高利十三世发起的。因此,无论个人对宗教的信仰如何,有必要看看公历的设计者相信什么:
在《创世记》中,创造需要六天,然后休息一天。这些是否是字面意义上的日子实际上并不重要,因为随后的每第七日休息的诫命谈论的是字面上的日子。犹太人将休息的第七天称为“安息日”。
在福音书中,一周中的时间并不是留给想象的。当弥赛亚被埋葬时(因为这是一个节日)或第二天(因为这是一个安息日),香水不能涂在弥赛亚的尸体上,所以妇女们在第二天早上到达坟墓。安息日,并记录他们发现它是空的,然后与复活的弥赛亚交谈。
为了纪念公历的设计者和早期追随者深信不疑的这两个事件,他们将(a)安息日(我们的星期六)定为周末,根据定义,这是一周的第七天,并且( b) 与复活相对应的工作日(我们的星期日),因此必须是下一周的第一天。
这就是为什么在公历中,一周从星期日开始。这是美国所遵循的系统,大多数操作系统 API 都是在美国设计的,包括 Windows API。
The modern calendar was sponsored by Pope Gregory XIII. So regardless of one's personal beliefs about religion, it's necessary to look at what the designers of the Gregorian calendar believed:
In Genesis, the creation takes six days followed by one day of rest. It doesn't actually matter whether those were literal days, because the follow-up commandment to rest on each seventh day was talking about a literal day. That seventh day on which to rest was called "Sabbath" by the Jews.
In the gospels, the time of week isn't left to the imagination. Perfume could not be applied to the body of the Messiah as he was buried (as it was a feast day) or on the next day (as it was a Sabbath), so the women arrived at the tomb on the morning following the Sabbath, and recorded that they found it empty and thereafter spoke to a resurrected Messiah.
In honor of these two events in which the designers of and early adherents to the Gregorian calendar deeply believed, they made a weekend out of (a) the Sabbath (our Saturday), which was by definition the seventh day of one week, and (b) the weekday corresponding to resurrection (our Sunday), which therefore had to be the first day of the next week.
And that's why, in the Gregorian calendar, the week starts on Sunday. This is the system followed in the USA where the majority of OS APIs were designed, including the Windows API.