ExcelHome技术论坛

 找回密码
 免费注册

QQ登录

只需一步,快速开始

快捷登录

搜索
EH技术汇-专业的职场技能充电站 妙哉!函数段子手趣味讲函数 Excel服务器-会Excel,做管理系统 效率神器,一键搞定繁琐工作
HR薪酬管理数字化实战 Excel 2021函数公式学习大典 Excel数据透视表实战秘技 打造核心竞争力的职场宝典
让更多数据处理,一键完成 数据工作者的案头书 免费直播课集锦 ExcelHome出品 - VBA代码宝免费下载
用ChatGPT与VBA一键搞定Excel WPS表格从入门到精通 Excel VBA经典代码实践指南
查看: 2083|回复: 6

微软的Bug?!

[复制链接]

TA的精华主题

TA的得分主题

发表于 2005-12-19 20:08 | 显示全部楼层 |阅读模式
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件       ★免费下载 ★       ★ 使用帮助
微软的农历是错的? GfaP6lx7.rar (110.48 KB, 下载次数: 8)
[此贴子已经被作者于2005-12-19 20:11:40编辑过]

微软的Bug?!

微软的Bug?!

TA的精华主题

TA的得分主题

发表于 2005-12-19 20:10 | 显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用  · 内置多项VBA编程加强工具       ★ 免费下载 ★      ★使用手册
果然是啊!

TA的精华主题

TA的得分主题

发表于 2005-12-19 20:24 | 显示全部楼层

04年也是错的,04年冬至它显示的是21日;

03年是对的;07与06年也是对的

这个向导农历最大只支持到07年!

TA的精华主题

TA的得分主题

 楼主| 发表于 2005-12-19 20:28 | 显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用  · 内置多项VBA编程加强工具       ★ 免费下载 ★      ★使用手册

奇怪的是他的代码由此字样:

WORD 97 WIZARD
Calendar Wizard Specific Code

难道他(微软)一直没改过?

还有就是没人发现?不然的话,如果有人发现的话,为什么2003仍然有此?

从代码中看不出农历是怎么生成的?(这很可能是我没看懂)

TA的精华主题

TA的得分主题

发表于 2005-12-19 20:32 | 显示全部楼层
依下图这个为准吧。中国的历法和洋历法不符是事实,中国是个农业大国,所以就保留了,不然要这个造成混乱的东西干什么?其他国家民族的人没要用农历活得不也快活得很?袁大头定的春节日期现在有人想变变它了,呵呵。
[此贴子已经被作者于2005-12-19 20:37:20编辑过]

微软的Bug?!

微软的Bug?!

TA的精华主题

TA的得分主题

发表于 2005-12-19 20:33 | 显示全部楼层

啊!它的代码不是用的计算,全部是先定义好的,孔兄注意到这段没有?——

Private Sub GetSimSection(iYear, iMonth)
Dim iSimSection
Dim j
iSimSection = (iYear - 1997) * 24 + (iMonth - 1) * 2
j = LunarSection(iSimSection) - 1
LunarAutotext(j) = "SimSection" + WordBasic.[LTrim$](Str((iMonth - 1) * 2))
j = LunarSection(iSimSection + 1) - 1
LunarAutotext(j) = "SimSection" + WordBasic.[LTrim$](Str((iMonth - 1) * 2 + 1))
End Sub ' GetSimSection

Private Sub InitSimString()
LunarMonthDay(0) = 29 '11
LunarMonthDay(1) = 29 '12 1997
LunarMonthDay(2) = 30 '1
LunarMonthDay(3) = 29 '2
LunarMonthDay(4) = 30 '3
LunarMonthDay(5) = 29 '4
LunarMonthDay(6) = 30 '5
LunarMonthDay(7) = 29 '6
LunarMonthDay(8) = 30 '7
LunarMonthDay(9) = 30 '8
LunarMonthDay(10) = 29 '9
LunarMonthDay(11) = 30 '10
LunarMonthDay(12) = 30 '11
LunarMonthDay(13) = 29 '12 1998
LunarMonthDay(14) = 30 '1
LunarMonthDay(15) = 29 '2
LunarMonthDay(16) = 29 '3
LunarMonthDay(17) = 30 '4
LunarMonthDay(18) = 29 '5
LunarMonthDay(19) = 39 'r5
LunarMonthDay(20) = 30 '6
LunarMonthDay(21) = 30 '7
LunarMonthDay(22) = 29 '8
LunarMonthDay(23) = 30 '9
LunarMonthDay(24) = 30 '10
LunarMonthDay(25) = 29 '11
LunarMonthDay(26) = 30 '12 1999
LunarMonthDay(27) = 30 '1
LunarMonthDay(28) = 29 '2
LunarMonthDay(29) = 29 '3
LunarMonthDay(30) = 30 '4
LunarMonthDay(31) = 29 '5
LunarMonthDay(32) = 29 '6
LunarMonthDay(33) = 30 '7
LunarMonthDay(34) = 29 '8
LunarMonthDay(35) = 30 '9
LunarMonthDay(36) = 30 '10
LunarMonthDay(37) = 30 '11
LunarMonthDay(38) = 29 '12 2000
LunarMonthDay(39) = 30 '1
LunarMonthDay(40) = 30 '2
LunarMonthDay(41) = 29 '3
LunarMonthDay(42) = 29 '4
LunarMonthDay(43) = 30 '5
LunarMonthDay(44) = 29 '6
LunarMonthDay(45) = 29 '7
LunarMonthDay(46) = 30 '8
LunarMonthDay(47) = 29 '9
LunarMonthDay(48) = 30 '10
LunarMonthDay(49) = 30 '11
LunarMonthDay(50) = 29 '12 2001
LunarMonthDay(51) = 30 '1
LunarMonthDay(52) = 30 '2
LunarMonthDay(53) = 29 '3
LunarMonthDay(54) = 30 '4
LunarMonthDay(55) = 39 'r4
LunarMonthDay(56) = 30 '5
LunarMonthDay(57) = 29 '6
LunarMonthDay(58) = 29 '7
LunarMonthDay(59) = 30 '8
LunarMonthDay(60) = 29 '9
LunarMonthDay(61) = 30 '10
LunarMonthDay(62) = 29 '11
LunarMonthDay(63) = 30 '12 2002
LunarMonthDay(64) = 30 '1
LunarMonthDay(65) = 30 '2
LunarMonthDay(66) = 29 '3
LunarMonthDay(67) = 30 '4
LunarMonthDay(68) = 29 '5
LunarMonthDay(69) = 30 '6
LunarMonthDay(70) = 29 '7
LunarMonthDay(71) = 29 '8
LunarMonthDay(72) = 30 '9
LunarMonthDay(73) = 29 '10
LunarMonthDay(74) = 30 '11
LunarMonthDay(75) = 29 '12 2003
LunarMonthDay(76) = 30 '1
LunarMonthDay(77) = 30 '2
LunarMonthDay(78) = 29 '3
LunarMonthDay(79) = 30 '4
LunarMonthDay(80) = 30 '5
LunarMonthDay(81) = 29 '6
LunarMonthDay(82) = 30 '7
LunarMonthDay(83) = 29 '8
LunarMonthDay(84) = 29 '9
LunarMonthDay(85) = 30 '10
LunarMonthDay(86) = 29 '11
LunarMonthDay(87) = 30 '12 2004
LunarMonthDay(88) = 29 '1
LunarMonthDay(89) = 30 '2
LunarMonthDay(90) = 39 'r2
LunarMonthDay(91) = 30 '3
LunarMonthDay(92) = 30 '4
LunarMonthDay(93) = 29 '5
LunarMonthDay(94) = 30 '6
LunarMonthDay(95) = 29 '7
LunarMonthDay(96) = 30 '8
LunarMonthDay(97) = 29 '9
LunarMonthDay(98) = 30 '10
LunarMonthDay(99) = 29 '11
LunarMonthDay(100) = 30 '12 2005
LunarMonthDay(101) = 29 '1
LunarMonthDay(102) = 30 '2
LunarMonthDay(103) = 29 '3
LunarMonthDay(104) = 30 '4
LunarMonthDay(105) = 29 '5
LunarMonthDay(106) = 30 '6
LunarMonthDay(107) = 30 '7
LunarMonthDay(108) = 29 '8
LunarMonthDay(109) = 30 '9
LunarMonthDay(110) = 29 '10
LunarMonthDay(111) = 30 '11
LunarMonthDay(112) = 29 '12 2006
LunarMonthDay(113) = 30 '1
LunarMonthDay(114) = 29 '2
LunarMonthDay(115) = 30 '3
LunarMonthDay(116) = 29 '4
LunarMonthDay(117) = 30 '5
LunarMonthDay(118) = 29 '6
LunarMonthDay(119) = 30 '7
LunarMonthDay(120) = 39 'r7
LunarMonthDay(121) = 30 '8
LunarMonthDay(122) = 30 '9
LunarMonthDay(123) = 29 '10
LunarMonthDay(124) = 30 '11
LunarMonthDay(125) = 30 '12 2007
LunarMonthDay(126) = 29 '1
LunarMonthDay(127) = 29 '2
LunarMonthDay(128) = 30 '3
LunarMonthDay(129) = 29 '4
LunarMonthDay(130) = 29 '5
LunarMonthDay(131) = 30 '6
LunarMonthDay(132) = 29 '7
LunarMonthDay(133) = 30 '8
LunarMonthDay(134) = 30 '9
LunarMonthDay(135) = 30 '10
LunarMonthDay(136) = 29 '11

LunarSection(0) = 5 '1997
LunarSection(1) = 20
LunarSection(2) = 4
LunarSection(3) = 18
LunarSection(4) = 5
LunarSection(5) = 20
LunarSection(6) = 5
LunarSection(7) = 20
LunarSection(8) = 5
LunarSection(9) = 21
LunarSection(10) = 5
LunarSection(11) = 21
LunarSection(12) = 7
LunarSection(13) = 23
LunarSection(14) = 7
LunarSection(15) = 23
LunarSection(16) = 7
LunarSection(17) = 23
LunarSection(18) = 8
LunarSection(19) = 23
LunarSection(20) = 7
LunarSection(21) = 22
LunarSection(22) = 7
LunarSection(23) = 22
LunarSection(24) = 5 '1998
LunarSection(25) = 20
LunarSection(26) = 4
LunarSection(27) = 19
LunarSection(28) = 6
LunarSection(29) = 21
LunarSection(30) = 5
LunarSection(31) = 20
LunarSection(32) = 6
LunarSection(33) = 21
LunarSection(34) = 6
LunarSection(35) = 21
LunarSection(36) = 7
LunarSection(37) = 23
LunarSection(38) = 8
LunarSection(39) = 23
LunarSection(40) = 8
LunarSection(41) = 23
LunarSection(42) = 8
LunarSection(43) = 23
LunarSection(44) = 7
LunarSection(45) = 22
LunarSection(46) = 7
LunarSection(47) = 22
LunarSection(48) = 6 '1999
LunarSection(49) = 20
LunarSection(50) = 4
LunarSection(51) = 19
LunarSection(52) = 6
LunarSection(53) = 21
LunarSection(54) = 5
LunarSection(55) = 20
LunarSection(56) = 6
LunarSection(57) = 21
LunarSection(58) = 6
LunarSection(59) = 22
LunarSection(60) = 7
LunarSection(61) = 23
LunarSection(62) = 8
LunarSection(63) = 23
LunarSection(64) = 8
LunarSection(65) = 23
LunarSection(66) = 9
LunarSection(67) = 24
LunarSection(68) = 8
LunarSection(69) = 23
LunarSection(70) = 7
LunarSection(71) = 22
LunarSection(72) = 6 '2000
LunarSection(73) = 21
LunarSection(74) = 4
LunarSection(75) = 19
LunarSection(76) = 5
LunarSection(77) = 20
LunarSection(78) = 4
LunarSection(79) = 20
LunarSection(80) = 5
LunarSection(81) = 21
LunarSection(82) = 5
LunarSection(83) = 21
LunarSection(84) = 7
LunarSection(85) = 22
LunarSection(86) = 7
LunarSection(87) = 23
LunarSection(88) = 7
LunarSection(89) = 23
LunarSection(90) = 8
LunarSection(91) = 23
LunarSection(92) = 7
LunarSection(93) = 22
LunarSection(94) = 7
LunarSection(95) = 21
LunarSection(96) = 6 '2001
LunarSection(97) = 20
LunarSection(98) = 4
LunarSection(99) = 18
LunarSection(100) = 5
LunarSection(101) = 20
LunarSection(102) = 5
LunarSection(103) = 20
LunarSection(104) = 5
LunarSection(105) = 21
LunarSection(106) = 5
LunarSection(107) = 21
LunarSection(108) = 7
LunarSection(109) = 23
LunarSection(110) = 7
LunarSection(111) = 23
LunarSection(112) = 7
LunarSection(113) = 23
LunarSection(114) = 8
LunarSection(115) = 23
LunarSection(116) = 7
LunarSection(117) = 22
LunarSection(118) = 7
LunarSection(119) = 22
LunarSection(120) = 5 '2002
LunarSection(121) = 20
LunarSection(122) = 4
LunarSection(123) = 19
LunarSection(124) = 6
LunarSection(125) = 21
LunarSection(126) = 5
LunarSection(127) = 20
LunarSection(128) = 6
LunarSection(129) = 21
LunarSection(130) = 6
LunarSection(131) = 21
LunarSection(132) = 7
LunarSection(133) = 23
LunarSection(134) = 8
LunarSection(135) = 23
LunarSection(136) = 8
LunarSection(137) = 23
LunarSection(138) = 8
LunarSection(139) = 23
LunarSection(140) = 7
LunarSection(141) = 22
LunarSection(142) = 7
LunarSection(143) = 22
LunarSection(144) = 6 '2003
LunarSection(145) = 20
LunarSection(146) = 4
LunarSection(147) = 19
LunarSection(148) = 6
LunarSection(149) = 21
LunarSection(150) = 5
LunarSection(151) = 20
LunarSection(152) = 6
LunarSection(153) = 21
LunarSection(154) = 6
LunarSection(155) = 22
LunarSection(156) = 7
LunarSection(157) = 23
LunarSection(158) = 8
LunarSection(159) = 23
LunarSection(160) = 8
LunarSection(161) = 23
LunarSection(162) = 9
LunarSection(163) = 24
LunarSection(164) = 8
LunarSection(165) = 23
LunarSection(166) = 7
LunarSection(167) = 22
LunarSection(168) = 6 '2004
LunarSection(169) = 21
LunarSection(170) = 4
LunarSection(171) = 19
LunarSection(172) = 5
LunarSection(173) = 20
LunarSection(174) = 4
LunarSection(175) = 20
LunarSection(176) = 6
LunarSection(177) = 21
LunarSection(178) = 5
LunarSection(179) = 21
LunarSection(180) = 7
LunarSection(181) = 22
LunarSection(182) = 7
LunarSection(183) = 23
LunarSection(184) = 7
LunarSection(185) = 23
LunarSection(186) = 8
LunarSection(187) = 23
LunarSection(188) = 7
LunarSection(189) = 22
LunarSection(190) = 7
LunarSection(191) = 21
LunarSection(192) = 5 '2005
LunarSection(193) = 20
LunarSection(194) = 4
LunarSection(195) = 18
LunarSection(196) = 5
LunarSection(197) = 20
LunarSection(214) = 5
LunarSection(215) = 20
LunarSection(198) = 5
LunarSection(199) = 21
LunarSection(200) = 5
LunarSection(201) = 21
LunarSection(202) = 7
LunarSection(203) = 23
LunarSection(204) = 7
LunarSection(205) = 23
LunarSection(206) = 7
LunarSection(207) = 23
LunarSection(208) = 8
LunarSection(209) = 23
LunarSection(210) = 7
LunarSection(211) = 22
LunarSection(212) = 7
LunarSection(213) = 22
LunarSection(216) = 5 '2006
LunarSection(217) = 20
LunarSection(218) = 4
LunarSection(219) = 19
LunarSection(220) = 6
LunarSection(221) = 21
LunarSection(222) = 5
LunarSection(223) = 20
LunarSection(224) = 6
LunarSection(225) = 21
LunarSection(226) = 6
LunarSection(227) = 21
LunarSection(228) = 7
LunarSection(229) = 23
LunarSection(230) = 8
LunarSection(231) = 23
LunarSection(232) = 8
LunarSection(233) = 23
LunarSection(234) = 8
LunarSection(235) = 23
LunarSection(236) = 7
LunarSection(237) = 22
LunarSection(238) = 7
LunarSection(239) = 22
LunarSection(240) = 6 '2007
LunarSection(241) = 20
LunarSection(242) = 4
LunarSection(243) = 19
LunarSection(244) = 6
LunarSection(245) = 21
LunarSection(246) = 5
LunarSection(247) = 20
LunarSection(248) = 6
LunarSection(249) = 21
LunarSection(250) = 6
LunarSection(251) = 22
LunarSection(252) = 7
LunarSection(253) = 23
LunarSection(254) = 8
LunarSection(255) = 23
LunarSection(256) = 8
LunarSection(257) = 23
LunarSection(258) = 9
LunarSection(259) = 24
LunarSection(260) = 8
LunarSection(261) = 23
LunarSection(262) = 7
LunarSection(263) = 22
End Sub


还有这段:
' Note: this list is indexed 0 - iMAX_PANEL
rgstrAssistantMsg(0) = "日历向导将创建日历,您可以自定义其中的图片,并在日历中记录一些事件。如果您想跟踪或自动提示某事件,应使用 Microsoft Outlook, Microsoft Schedule+, 或 Microsoft Exchange。"
rgstrAssistantMsg(1) = "选择您喜爱的样式。"
rgstrAssistantMsg(2) = "如要为插入的图片预留出位置,Word 将插入图片占位框,以后可以替换为您需要的图片。"
rgstrAssistantMsg(3) = "日历可以从任意月份开始,时间可以小于或大于 12 个月。每月单独占一页。"
rgstrAssistantMsg(4) = "若要改变设置,单击“上一步”按钮。"

' Note: change constant iCALL_BACK_COUNT if number of items in list changes
rgstrCallBackMsg(0) = "添加、删除或替换一图片"
rgstrCallBackMsg(1) = "在日历中键入信息"
rgstrCallBackMsg(2) = "获取其他帮助..."

rgstrCallBackTip(0) = "如果要删除图片,单击图片并键入 Delete。如果要添加图片,单击需要插入的位置,选择“插入”菜单“图片”子菜单“来自文件”的命令。"
rgstrCallBackTip(1) = "如果要输入信息,单击要插入文字的位置并开始键入。如果要在不同日期间移动,键入 Tab 键移至后一天,键入 Shift+Tab 移至前一天。"

'Load Month Name array
rgstrMonthName(0) = "一月"
rgstrMonthName(1) = "二月"
rgstrMonthName(2) = "三月"
rgstrMonthName(3) = "四月"
rgstrMonthName(4) = "五月"
rgstrMonthName(5) = "六月"
rgstrMonthName(6) = "七月"
rgstrMonthName(7) = "八月"
rgstrMonthName(8) = "九月"
rgstrMonthName(9) = "十月"
rgstrMonthName(10) = "十一月"
rgstrMonthName(11) = "十二月"

rgstrDayName(0) = "星期日"
rgstrDayName(1) = "星期一"
rgstrDayName(2) = "星期二"
rgstrDayName(3) = "星期三"
rgstrDayName(4) = "星期四"
rgstrDayName(5) = "星期五"
rgstrDayName(6) = "星期六"


'Load Days In Month array
rgiDaysInMonth(0) = 31
rgiDaysInMonth(1) = 28 'Will not be used - must be calculated for leap year accuracy
rgiDaysInMonth(2) = 31
rgiDaysInMonth(3) = 30
rgiDaysInMonth(4) = 31
rgiDaysInMonth(5) = 30
rgiDaysInMonth(6) = 31
rgiDaysInMonth(7) = 31
rgiDaysInMonth(8) = 30
rgiDaysInMonth(9) = 31
rgiDaysInMonth(10) = 30
rgiDaysInMonth(11) = 31

Public Const strWarnMinLunarExceeded As String = "选择农历时年份不能早于 1997。"
Public Const strWarnMaxLunarExceeded As String = "选择农历时年份不能晚于 2007。"

TA的精华主题

TA的得分主题

发表于 2005-12-19 20:46 | 显示全部楼层
网络上这类农历类的代码可以找到不少,都是通过查询事先定义好的数据来确定农历的。权威的数据大概是来自天文台吧。微软的这些数据看来来源不太可靠,允许查询的时段也太短,出错大概是没有认真校对、测试。
您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

手机版|关于我们|联系我们|ExcelHome

GMT+8, 2024-11-16 02:50 , Processed in 0.037201 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 1999-2023 Wooffice Inc.

沪公网安备 31011702000001号 沪ICP备11019229号-2

本论坛言论纯属发表者个人意见,任何违反国家相关法律的言论,本站将协助国家相关部门追究发言者责任!     本站特聘法律顾问:李志群律师

快速回复 返回顶部 返回列表