Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Add VietName lunar calendar" #222

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1357,8 +1357,7 @@ The following calendars are supported

* [Chinese Lunar](./calendar/lunar/README.md "Chinese Lunar"):contributed
by [gouguoyin](https://github.com/gouguoyin "gouguoyin")
* [Vietnamese Lunar](./calendar/vlunar/README.md "Vietnamese Lunar"):contributed
by [culy247](https://github.com/culy247 "culy247")

##### I18n

The following languages are supported
Expand Down
19 changes: 0 additions & 19 deletions calendar.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package carbon

import (
"github.com/golang-module/carbon/v2/calendar/lunar"
"github.com/golang-module/carbon/v2/calendar/vlunar"
)

// Lunar converts gregorian calendar to lunar calendar.
Expand All @@ -22,21 +21,3 @@ func CreateFromLunar(year, month, day, hour, minute, second int, isLeapMonth boo
c.time = lunar.NewLunar(year, month, day, hour, minute, second, isLeapMonth).ToGregorian().Time
return c
}

// Lunar converts the solar calendar to the lunar calendar.
// 将公历转为农历
func (c Carbon) VLunar() (l vlunar.Lunar) {
if c.Error != nil {
l.Error = c.Error
return l
}
return vlunar.NewGregorian(c.ToStdTime()).ToLunar()
}

// CreateFromLunar creates a Carbon instance from Lunar date and time.
// 从 农历日期 创建 Carbon 实例
func CreateFromVLunar(year, month, day, hour, minute, second int, isLeapMonth bool) Carbon {
c := NewCarbon()
c.time = vlunar.NewLunar(year, month, day, hour, minute, second, isLeapMonth).ToGregorian().Time
return c
}
105 changes: 0 additions & 105 deletions calendar/vlunar/README.md

This file was deleted.

Loading
Loading