You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Get persian yearcarbon.Parse("2020-08-05 13:14:15").Persian().Year() // 1399// Get persian monthcarbon.Parse("2020-08-05 13:14:15").Persian().Month() // 5// Get persian daycarbon.Parse("2020-08-05 13:14:15").Persian().Day() // 15// Get persian hourcarbon.Parse("2020-08-05 13:14:15").Persian().Hour() // 13// Get persian minutecarbon.Parse("2020-08-05 13:14:15").Lunar().Minute() // 14// Get persian secondcarbon.Parse("2020-08-05 13:14:15").Lunar().Second() // 15// Get persian date and time stringcarbon.Parse("2020-08-05 13:14:15").Lunar().String() // 1399-05-15 13:14:15fmt.Printf("%s", carbon.Parse("2020-08-05 13:14:15").Lunar()) // 1399-05-15 13:14:15// // Get persian month as stringcarbon.Parse("2020-08-05 13:14:15").Persian().ToMonthString() // مرداد// // Get persian week as stringcarbon.Parse("2020-08-05 13:14:15").Persian().ToWeekString() // چهارشنبه// Whether is a persian zero timecarbon.Parse("0000-00-00 00:00:00").Persian().IsZero() // truecarbon.Parse("2020-08-05 13:14:15").Persian().IsZero() // false// Whether is a persian leap yearcarbon.Parse("2016-03-20 00:00:00").Persian().IsLeapYear() // truecarbon.Parse("2020-08-05 13:14:15").Persian().IsLeapYear() // false