mirror of
https://github.com/hanzoai/traces.git
synced 2026-10-30 18:20:41 +00:00
* Bump go.opentelemetry.io/collector/processor from 0.89.0 to 0.94.1 Bumps [go.opentelemetry.io/collector/processor](https://github.com/open-telemetry/opentelemetry-collector) from 0.89.0 to 0.94.1. - [Release notes](https://github.com/open-telemetry/opentelemetry-collector/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG-API.md) - [Commits](https://github.com/open-telemetry/opentelemetry-collector/compare/v0.89.0...v0.94.1) --- updated-dependencies: - dependency-name: go.opentelemetry.io/collector/processor dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Update serverless gomod * vendor update * Update serverless gomod * delete this file * add it back --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: grafanabot <[email protected]> Co-authored-by: Jennie Pham <[email protected]>
21 lines
569 B
Go
21 lines
569 B
Go
package iso8601
|
|
|
|
import "time"
|
|
|
|
// The following is copied from the Go standard library to implement date range validation logic
|
|
// equivalent to the behaviour of Go's time.Parse.
|
|
|
|
func isLeap(year int) bool {
|
|
return year%4 == 0 && (year%100 != 0 || year%400 == 0)
|
|
}
|
|
|
|
// daysInMonth is the number of days for non-leap years in each calendar month starting at 1
|
|
var daysInMonth = [...]int{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
|
|
|
|
func daysIn(m time.Month, year int) int {
|
|
if m == time.February && isLeap(year) {
|
|
return 29
|
|
}
|
|
return daysInMonth[int(m)]
|
|
}
|