Skip to content

Commit

Permalink
Solar->Gregorian
Browse files Browse the repository at this point in the history
  • Loading branch information
gouguoyin committed Jan 23, 2024
1 parent 5158f71 commit 6f95cc8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions calendar/lunar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ by [awesome-go](https://github.com/avelino/awesome-go#date-and-time "awesome-go"

> Currently only `200` years from `1900` to `2100` are supported
##### Convert Solar into Lunar
##### Convert Gregorian into Lunar

```go
// Get Lunar year of animal
Expand Down Expand Up @@ -120,13 +120,13 @@ carbon.Parse("2020-03-21 19:00:00").Lunar().IsEleventhDoubleHour() // true
carbon.Parse("2020-03-21 21:00:00").Lunar().IsTwelfthDoubleHour() // true
```

##### Convert Lunar into Solar
##### Convert Lunar into Gregorian

```go
// Convert the Lunar Calendar December 11, 2023 to the Solar Calendar
// Convert the Lunar Calendar December 11, 2023 to the gregorian calendar
carbon.CreateFromLunar(2023, 12, 11, 0, 0, 0, false).ToDateTimeString() // 2024-01-21 00:00:00
// Convert lunar calendar February 11, 2023 to Solar calendar
// Convert lunar calendar February 11, 2023 to gregorian calendar
carbon.CreateFromLunar(2023, 2, 11, 0, 0, 0, false).ToDateTimeString() // 2024-03-02 00:00:00
// Convert the Lunar Calendar Leap February 11, 2024 to the Solar Calendar
// Convert the Lunar Calendar Leap February 11, 2024 to the gregorian calendar
carbon.CreateFromLunar(2023, 2, 11, 0, 0, 0, true).ToDateTimeString() // 2023-04-01 00:00:00
```

0 comments on commit 6f95cc8

Please sign in to comment.