()
| 131 | } |
| 132 | |
| 133 | func ExampleAddYearSafe() { |
| 134 | date, _ := time.Parse("2006-01-02", "2020-02-29") |
| 135 | |
| 136 | result1 := AddYearSafe(date, 1) |
| 137 | result2 := AddYearSafe(date, -1) |
| 138 | |
| 139 | fmt.Println(result1.Format("2006-01-02")) |
| 140 | fmt.Println(result2.Format("2006-01-02")) |
| 141 | |
| 142 | // Output: |
| 143 | // 2021-02-28 |
| 144 | // 2019-02-28 |
| 145 | } |
| 146 | |
| 147 | func ExampleGetNowDate() { |
| 148 | result := GetNowDate() |
nothing calls this directly
no test coverage detected
searching dependent graphs…