()
| 116 | } |
| 117 | |
| 118 | func ExampleAddMonthSafe() { |
| 119 | date1, _ := time.Parse("2006-01-02", "2025-01-31") |
| 120 | result1 := AddMonthSafe(date1, 1) |
| 121 | |
| 122 | date2, _ := time.Parse("2006-01-02", "2024-02-29") |
| 123 | result2 := AddMonthSafe(date2, -1) |
| 124 | |
| 125 | fmt.Println(result1.Format("2006-01-02")) |
| 126 | fmt.Println(result2.Format("2006-01-02")) |
| 127 | |
| 128 | // Output: |
| 129 | // 2025-02-28 |
| 130 | // 2024-01-29 |
| 131 | } |
| 132 | |
| 133 | func ExampleAddYearSafe() { |
| 134 | date, _ := time.Parse("2006-01-02", "2020-02-29") |
nothing calls this directly
no test coverage detected
searching dependent graphs…