Skip to content

Latest commit

 

History

History
25 lines (22 loc) · 619 Bytes

README.md

File metadata and controls

25 lines (22 loc) · 619 Bytes

LunarSolarConverter-tsql

T-sql, chinese lunar solar calandar converter
MS SQL Server 專用, 國曆<->陰曆轉換
based https://github.com/isee15/Lunar-Solar-Calendar-Converter

Useage

Solar -> Lunar

SELECT * FROM [LunarSolarConverter_SolarToLunar]('2021-01-08')
--2020-11-25

Lunar -> Solar

SELECT * FROM [LunarSolarConverter_LunarToSolar]('2021-01-15',0)
--2021-02-26

Installation

  1. create five function
    LunarSolarConverter_GetBitInt
    LunarSolarConverter_SolarFromInt
    LunarSolarConverter_SolarToInt
    LunarSolarConverter_SolarToLunar
    LunarSolarConverter_LunarToSolar