正在加载

☘ vb搜周易四 🌼 柱八字算命命理「搜卜易居四柱八字排盘」

  • 作者: 周岚毅
  • 发布时间:2025-01-07


1、vb搜周易四 🐼 柱八字 🕊 算命命理

vb

' 导 🌳 入必要的 🌵

Imports System

Imports System.IO

Imports System.Text

Module Module1

' 定义用于保 🌷 存八字信息 🐯 的类

Class BaziLocal

Private _Year As Integer

Private _Month As Integer

Private _Day As Integer

Private _Hour As Integer

' 构造函数,初始 🐈 化八字信息

Public Sub New(ByVal year As Integer, ByVal month As Integer, ByVal day As Integer, ByVal hour As Integer)

_Year = year

_Month = month

_Day = day

_Hour = hour

End Sub

' 获取年 🐟

Public ReadOnly Property YearStem As String

Get

Return GetStem(_Year)

End Get

End Property

' 获取 🌵 🦅 🐼

Public ReadOnly Property YearBranch As String

Get

Return GetBranch(_Year)

End Get

End Property

' 获取月干

Public ReadOnly Property MonthStem As String

Get

Return GetStem(_Month)

End Get

End Property

' 获 🐎 取月支

Public ReadOnly Property MonthBranch As String

Get

Return GetBranch(_Month)

End Get

End Property

' 获 🌸 取日干

Public ReadOnly Property DayStem As String

Get

Return GetStem(_Day)

End Get

End Property

' 获 🌿 取日支

Public ReadOnly Property DayBranch As String

Get

Return GetBranch(_Day)

End Get

End Property

' 获取 🌿 🐵 🐦

Public ReadOnly Property HourStem As String

Get

Return GetStem(_Hour)

End Get

End Property

' 获 🐠 🌷 时支

Public ReadOnly Property HourBranch As String

Get

Return GetBranch(_Hour)

End Get

End Property

' 获 🐯 🌼 🌷 支信息

Private Function GetStem(ByVal value As Integer) As String

Dim stem = New String() {"甲", "乙", "丙", "丁", "戊 🕊 ", "己", "庚", "辛", "壬", "癸"}

Return stem(value % 10 1)

End Function

' 获取 🐎 干支 🦄 🍁

Private Function GetBranch(ByVal value As Integer) As String

Dim branch = New String() {"子 🌷 ", "丑", "寅", "卯", "辰", "巳", "午", "未", "申", "酉", "戌", "亥 🐧 "}

Return branch(value % 12 1)

End Function

End Class

' 获取本地八 🐘

Function GetLocalBaziLocal() As BaziLocal

' 获取 🐦 当前 🌿 时间

Dim now = DateTime.Now

' 计算偏移量,将时间转换成北 🐝 京时间

Dim offset = TimeZoneInfo.GetSystemTimeZones().SingleOrDefault(Function(x) x.BaseUtcOffset == new TimeSpan(8, 0, 0))

If offset IsNot Nothing Then

now = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(now, offset.Id)

End If

' 获取公历信 🦢

Dim year = now.Year

Dim month = now.Month

Dim day = now.Day

Dim hour = now.Hour

' 计 🌸 🐠 地支 🕸 信息

Dim stemYear = year 4

Dim stemMonth = month 1

If day >= 21 Then

stemMonth = stemMonth + 1

End If

Dim stemDay = day

If hour >= 11 Then

stemDay = stemDay + 1

End If

Dim branchYear = year 4

Dim branchMonth = month

Dim branchDay = day

Dim branchHour = hour + 1

' 创建 🌸 本地 🌵 八字 🌳 实例

Dim baziLocal = New BaziLocal(stemYear, stemMonth, stemDay, branchHour)

' 返 💮 回结果 🪴

Return baziLocal

End Function

' 主 🦁 函数 🌵

Sub Main()

' 获取本 🕷 地八字 🐶

Dim baziLocal = GetLocalBaziLocal()

' 打印八 🍁 🍀 信息 🌾

Console.WriteLine("年 🐞 🦅 :" & baziLocal.YearStem)

Console.WriteLine("年 🦄 🐈 :" & baziLocal.YearBranch)

Console.WriteLine("月 🐋 🐟 :" & baziLocal.MonthStem)

Console.WriteLine("月 🍁 🪴 :" & baziLocal.MonthBranch)

Console.WriteLine("日干 🐼 :" & baziLocal.DayStem)

Console.WriteLine("日支 🌷 :" & baziLocal.DayBranch)

Console.WriteLine("时 🍀 🐕 :" & baziLocal.HourStem)

Console.WriteLine("时 🌾 🦢 :" & baziLocal.HourBranch)

' 等待 🐞 用户输 🌻

Console.ReadKey()

End Sub

End Module

2、搜 🐬 卜易居四柱八字排盘

搜卜易居 四 🌼 🐵 八字排 🍀

[搜卜易 🦢 居]()提供免 🐈 费的四柱八字排盘服 🐕 务。

使用方法:

1. 打开搜卜易居网站,点击菜单栏中的"四柱八字排 🐅 盘"。

2. 输入您的出生日期 🕊 出生、时间和出生城市。

3. 点击"排 🦋 "盘 🦟 按钮。

排盘结果:

排盘结果 🐈 🐛 括:

🐘 柱八 🐡 字:年 🐒 柱、月柱、日柱、时柱

🐘 支:天干地支

五行 🦊 五行:属性 🐘

生肖:十二 💐 🌴

纳音:六十年 🦢 纳音 🕸

星座 🐵 :太 🐳 🌼 星座

注意事项:

确保输入 🌷 的出生 🐘 信息准确无 🐡 误。

排盘结果仅供 🦈 参考,不可作为决策 🐠 依据。

建议咨询专业命理师以获得更深入的解 🐛 读。