您的位置:首页 > 配对

阴历转阳历转换器 应用(阴历转阳历转换器)

阴历转阳历转换器 应用(阴历转阳历转换器)

农历转公历

Public Function LTG(Optional xx_date As Date, Optional irow As Integer) '农历转公历

Dim LunarYear, LunarMonth, LunarDay

Dim NongliData(100)

'农历数据

NongliData(0) = 2635

NongliData(1) = 333387

NongliData(2) = 1701

NongliData(3) = 1748

NongliData(4) = 267701

NongliData(5) = 694

NongliData(6) = 2391

NongliData(7) = 133423

NongliData(8) = 1175

NongliData(9) = 396438

NongliData(10) = 3402

NongliData(11) = 3749

NongliData(12) = 331177

NongliData(13) = 1453

NongliData(14) = 694

NongliData(15) = 201326

NongliData(16) = 2350

NongliData(17) = 465197

NongliData(18) = 3221

NongliData(19) = 3402

NongliData(20) = 400202

NongliData(21) = 2901

NongliData(22) = 1386

NongliData(23) = 267611

NongliData(24) = 605

NongliData(25) = 2349

NongliData(26) = 137515

NongliData(27) = 2709

NongliData(28) = 464533

NongliData(29) = 1738

NongliData(30) = 2901

NongliData(31) = 330421

NongliData(32) = 1242

NongliData(33) = 2651

NongliData(34) = 199255

NongliData(35) = 1323

NongliData(36) = 529706

NongliData(37) = 3733

NongliData(38) = 1706

NongliData(39) = 398762

NongliData(40) = 2741

NongliData(41) = 1206

NongliData(42) = 267438

NongliData(43) = 2647

NongliData(44) = 1318

NongliData(45) = 204070

NongliData(46) = 3477

NongliData(47) = 461653

NongliData(48) = 1386

NongliData(49) = 2413

NongliData(50) = 330077

NongliData(51) = 1197

NongliData(52) = 2637

NongliData(53) = 268877

NongliData(54) = 3365

NongliData(55) = 531109

NongliData(56) = 2900

NongliData(57) = 2922

NongliData(58) = 398042

NongliData(59) = 2395

NongliData(60) = 1179

NongliData(61) = 267415

NongliData(62) = 2635

NongliData(63) = 661067

NongliData(64) = 1701

NongliData(65) = 1748

NongliData(66) = 398772

NongliData(67) = 2742

NongliData(68) = 2391

NongliData(69) = 330031

NongliData(70) = 1175

NongliData(71) = 1611

NongliData(72) = 200010

NongliData(73) = 3749

NongliData(74) = 527717

NongliData(75) = 1452

NongliData(76) = 2742

NongliData(77) = 332397

NongliData(78) = 2350

NongliData(79) = 3222

NongliData(80) = 268949

NongliData(81) = 3402

NongliData(82) = 3493

NongliData(83) = 133973

NongliData(84) = 1386

NongliData(85) = 464219

NongliData(86) = 605

NongliData(87) = 2349

NongliData(88) = 334123

NongliData(89) = 2709

NongliData(90) = 2890

NongliData(91) = 267946

NongliData(92) = 2773

NongliData(93) = 592565

NongliData(94) = 1210

NongliData(95) = 2651

NongliData(96) = 395863

NongliData(97) = 1323

NongliData(98) = 2707

NongliData(99) = 265877

NongliData(100) = 1706

Dim m, monthCount, toCurMonthCnt, LeapMonth, theDate, curTime

Dim i1, i2, i3, bit

'获取当前变量日期

curTime = xx_date

'LunarYear = Year(curTime)

LunarYear = Year(Now())

LunarMonth = Month(curTime)

LunarDay = Day(curTime)

m = LunarYear - 1921

monthCount = 0

toCurMonthCnt = 0

LeapMonth = -1

theDate = LunarDay - 1

For i1 = 0 To m - 1 Step 1

If (NongliData(i1) < 4095) Then

monthCount = 11

Else

monthCount = 12

End If

For i2 = 0 To monthCount Step 1

bit = NongliData(i1)

For i3 = 1 To i2 Step 1

bit = Int(bit / 2)

Next

bit = bit Mod 2

theDate = theDate + 29 + bit

Next

Next

If (NongliData(m) < 4095) Then

monthCount = 11

toCurMonthCnt = monthCount - LunarMonth + 2

Else

monthCount = 12

toCurMonthCnt = monthCount - LunarMonth + 1

LeapMonth = Int(NongliData(m) / 65536)

If LunarMonth <= LeapMonth Then toCurMonthCnt = toCurMonthCnt + 1

End If

For i2 = monthCount To toCurMonthCnt Step -1

bit = NongliData(m)

For i3 = 1 To i2 Step 1

bit = Int(bit / 2)

Next

bit = bit Mod 2

theDate = theDate + 29 + bit

Next

LTG = DateAdd("d", theDate, "1921/2/8")

If irow = 1 Then

Sheet1.Cells(1, 10) = "'" & LTG

Else

Sheet1.Cells(irow, 4) = "'" & LTG

End If

End Function

Private Sub CommandButton1_Click()

If IsDate(Sheet1.Cells(1, 9)) = True And IsNull(Sheet1.Cells(1, 9)) = False And Sheet1.Cells(1, 9) <> "" Then

aaa = LTG(Sheet1.Cells(1, 9), 1)

End If

Dim i As Integer

For i = 2 To 100

Sheet1.Cells(i, 4) = ""

If Sheet1.Cells(i, 2) <> "" And IsNull(Sheet1.Cells(i, 2)) = False And IsDate(Sheet1.Cells(i, 2)) = True Then

If Sheet1.Cells(i, 3) = "Y" Then

bbb = LTG(Sheet1.Cells(i, 2), i)

Else

Sheet1.Cells(i, 4) = "'" & Sheet1.Cells(i, 2)

End If

Else

Application.DisplayAlerts = False

Application.Quit

End If

Next i

End Sub

5款Mac必备软件,各个都是精品推荐,让你的电脑更好用

软件推荐(第15期):

今天给大家分享5款Mac必备软件,各个都是精品推荐,让你的电脑更好用。

一、小历(查看日历)

我的iPhone上一直用的日历就是小历,我觉得挺好用的,所以也在Mac上安装了。而且Mac自带的日历,更像是一个日程管理软件,而不是一个日期查看软件。

小历这款软件,可以让你很方便地在顶部菜单栏,快速查看当前的日期、农历、节日、节气、法定节假日,很符合我们国内看日历的习惯和需求。

这款软件还不到1M,可以直接在App Store购买安装。

二、IINA(视频播放器)

Mac上有一款内置的视频播放器QuickTime Player,但是它支持的视频格式比较少,对字幕的支持也很有限。IINA作为一款免费的本地视频播放软件,很好地弥补了QuickTime Player功能上的不足。

它可以播放几乎所有常见的视频格式,支持加载字幕文件、在线查找字幕,另外像倍速播放、截图、快捷键和控制手势的支持都有,甚至还可以开启画中画模式播放。

作为一款超强播放器,它还支持各种网站的流媒体播放,复制链接或者直接点击浏览器的插件,就能用播放器来播放了。

这款软件并没有在App Store上架,需要在官网下载后安装。

三、Keka(压缩神器)

说到Mac里的解压缩软件,真的让不少人头疼过,系统自带的解压缩,只能打开部分.zip的压缩包,很难满足日常的使用。

而且由Mac系统创造的压缩包,在Windows系统里打开,有乱码的风险,所以一款兼容全能的解压缩软件就很必要了。

这款Keka不能说是最强的,但是对于大部分用户来说已经够用了,它可以选择不同的压缩格式,还可以让压缩包里排除Mac特有的系统识别文件,非常贴心。

Keka在Mac的App Store里面下载是收费的,但是在它的官网可以免费下载哦。

四、迅捷视频转换器(格式转换)

作为一名视频剪辑师,经常在网站上下载视频素材,然而视频文件格式多种多样,这时候就需要用到格式转换工具,将所有视频一次性转为统一的格式。

它支持十几种格式相互转换,添加视频后,设置成你需要转换的格式,可以批量处理几十到几百个视频文件,高效率办公全靠它!

除了可以转换视频格式,还能转换音频格式、视频压缩、去水印、分割、合并,以及录屏。一款工具几乎解决了视频上的所有难题。

这款视频转换工具,支持Mac和Windows双系统。

五、AdGuard(屏蔽广告)

AdGuard可以屏蔽网页上的各种广告,在浏览器中启用AdGuard,网页瞬间变得超级清爽!让你专注于要看的内容,而不被广告干扰,并且还可以避免过多的广告,拖累电脑的速度。

AdGuard的是目前在Safari里面,唯一可用的广告屏蔽软件。如果你用的是Chrome,也可以试试Adblook Plus,同样优秀好用。

最美尾巴:

以上就是我今天的分享内容,如果大家觉得有用,记得点赞告诉我,我会继续分享更多优质的内容。

上面这5款Mac必备软件,各个都是精品推荐,让你的电脑更好用。