An open API service indexing awesome lists of open source software.

https://github.com/codeaholicguy/halunar

Haskell implement of lunar calendar
https://github.com/codeaholicguy/halunar

haskell library lunar-calendar

Last synced: about 1 year ago
JSON representation

Haskell implement of lunar calendar

Awesome Lists containing this project

README

          

halunar

A Lunar calendar calculator library written in Haskell.

Another version which is written in JavaScript https://github.com/codeaholicguy/amlich.js/.

### Usage

```hs
calculateLunarDateFromDate :: (Int, Int, Int, Int) -> (Int, Int, Int)
calculateLunarDateFromDate (day, month, year, timeZone) = (lunarDay, lunarMonth, lunarYear)
```

```hs
calculateDateFromLunarDate :: (Int, Int, Int, Int) -> (Int, Int, Int)
calculateDateFromLunarDate (lunarDay, lunarMonth, lunarYear, timeZone) = (day, month, year)
```

### License

[MIT](LICENSE)

### Reference

[Computing the Vietnamese lunar calendar](https://www.informatik.uni-leipzig.de/~duc/amlich/calrules_en.html)

### Special thanks

- The logo is designed by [@reallinfo](https://github.com/reallinfo)