mirror of
https://github.com/duke-git/lancet.git
synced 2026-11-16 05:12:11 +08:00
feat: add IsLeapYear
This commit is contained in:
1 parent
219e31d929
commit
945c59896b
5 files changed
+263
-161
No files matched your search
@@ -321,3 +321,15 @@ func ExampleNewUnixNow() {
|
||||
// // Output:
|
||||
// // 2006-01-02T23:04:05+08:00
|
||||
// }
|
||||
|
||||
func ExampleIsLeapYear() {
|
||||
result1 := IsLeapYear(2000)
|
||||
result2 := IsLeapYear(2001)
|
||||
|
||||
fmt.Println(result1)
|
||||
fmt.Println(result2)
|
||||
|
||||
// Output:
|
||||
// true
|
||||
// false
|
||||
}
|
||||
Reference in new issue
Block a user