查看MSDN上的MonthCalendar.MinDate的说明,发现属性默认值为01/01/1753,很是不解——为什么最小日期是1753年1月1日,找了许多文档都没有找到合理解释,恰好今天看到ms monthcal的部分代码,里面的一段代码注释恰好就说明了这个问题。
    以下就是这段代码,里面定义并解释了两个名词,新纪元(Epoch):宇宙的最开始(这真是个恐怖的词句!Why the MonthCalendar.MinDate is "01/01/1753"?,好在还有个附注——这个就是MS支持的最早日期啦);世界末日(Armageddon):圣经解释是“哈米吉多顿,世界末日善恶决战的战场”,说它是宇宙末日貌似没有问题的咯。然后就道出了两个概念的值,这里Epoch就是1752年9月14日,原因是英美历史上1572年9月14日的前一天是1572年9月2日,而Armageddon就是4位记年的最大值(9999年12月31日),看看这里,这位大哥还挺逗,居然考虑到了10k年的问题,Why the MonthCalendar.MinDate is "01/01/1753"?)。
 1Why the MonthCalendar.MinDate is "01/01/1753"?//
 2Why the MonthCalendar.MinDate is "01/01/1753"?//  Epoch = the beginning of the universe (the earliest date we support)
 3Why the MonthCalendar.MinDate is "01/01/1753"?//  Armageddon = the end of the universe (the latest date we support)
 4Why the MonthCalendar.MinDate is "01/01/1753"?//
 5Why the MonthCalendar.MinDate is "01/01/1753"?//  Epoch is 14-sep-1752 because that's when the Gregorian calendar
 6Why the MonthCalendar.MinDate is "01/01/1753"?//  kicked in.  The day before 14-sep-1752 was 2-sep-1752 (in British
 7Why the MonthCalendar.MinDate is "01/01/1753"?//  and US history; other countries switched at other times).
 8Why the MonthCalendar.MinDate is "01/01/1753"?//
 9Why the MonthCalendar.MinDate is "01/01/1753"?//  Armageddon is 31-dec-9999 because we assume four digits for years
10Why the MonthCalendar.MinDate is "01/01/1753"?//  is enough.  (Oh no, the Y10K problemWhy the MonthCalendar.MinDate is "01/01/1753"?)
11Why the MonthCalendar.MinDate is "01/01/1753"?//
12;

相关文章:

  • 2021-09-18
  • 2021-10-19
  • 2021-09-26
  • 2022-01-14
  • 2022-12-23
  • 2021-07-13
  • 2021-07-03
  • 2021-06-09
猜你喜欢
  • 2021-11-11
  • 2021-09-18
  • 2021-07-08
  • 2021-08-19
  • 2021-09-30
  • 2021-09-24
相关资源
相似解决方案