From d16ee386d2dca9b24755037b6d774e542bb34a24 Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Fri, 14 Oct 2022 14:24:57 +1100 Subject: [PATCH] Fixed broken link --- pkg/yqlib/doc/operators/datetime.md | 6 +++--- pkg/yqlib/doc/operators/headers/datetime.md | 4 ++-- pkg/yqlib/operator_datetime_test.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/yqlib/doc/operators/datetime.md b/pkg/yqlib/doc/operators/datetime.md index f97a37ea..36048e82 100644 --- a/pkg/yqlib/doc/operators/datetime.md +++ b/pkg/yqlib/doc/operators/datetime.md @@ -13,11 +13,11 @@ To specify a custom parsing format, use the `with_dtf` operator. The first param yq 'with_dtf("myformat"; .a + "3h" | tz("Australia/Melbourne"))' ``` -See https://pkg.go.dev/time#pkg-constants for examples of formatting options. +See the [library docs](https://pkg.go.dev/time#pkg-constants) for examples of formatting options. ## Timezones -This uses golangs built in LoadLocation function to parse timezones strings. See https://pkg.go.dev/time#LoadLocation for more details. +This uses golangs built in LoadLocation function to parse timezones strings. See the [library docs](https://pkg.go.dev/time#LoadLocation) for more details. ## Durations @@ -156,7 +156,7 @@ a: 2021-01-01T03:10:00Z ``` ## Date subtraction -You can subtract durations from dates. Assumes RFC3339 date time format, see [date-time operators](https://mikefarah.gitbook.io/yq/operators/date-time-operators) for more information. +You can subtract durations from dates. Assumes RFC3339 date time format, see [date-time operators](https://mikefarah.gitbook.io/yq/operators/datetime#date-time-formattings) for more information. Given a sample.yml file of: ```yaml diff --git a/pkg/yqlib/doc/operators/headers/datetime.md b/pkg/yqlib/doc/operators/headers/datetime.md index 39b0dd67..36da7178 100644 --- a/pkg/yqlib/doc/operators/headers/datetime.md +++ b/pkg/yqlib/doc/operators/headers/datetime.md @@ -13,11 +13,11 @@ To specify a custom parsing format, use the `with_dtf` operator. The first param yq 'with_dtf("myformat"; .a + "3h" | tz("Australia/Melbourne"))' ``` -See https://pkg.go.dev/time#pkg-constants for examples of formatting options. +See the [library docs](https://pkg.go.dev/time#pkg-constants) for examples of formatting options. ## Timezones -This uses golangs built in LoadLocation function to parse timezones strings. See https://pkg.go.dev/time#LoadLocation for more details. +This uses golangs built in LoadLocation function to parse timezones strings. See the [library docs](https://pkg.go.dev/time#LoadLocation) for more details. ## Durations diff --git a/pkg/yqlib/operator_datetime_test.go b/pkg/yqlib/operator_datetime_test.go index 094e08a3..2d01de49 100644 --- a/pkg/yqlib/operator_datetime_test.go +++ b/pkg/yqlib/operator_datetime_test.go @@ -77,7 +77,7 @@ var dateTimeOperatorScenarios = []expressionScenario{ }, { description: "Date subtraction", - subdescription: "You can subtract durations from dates. Assumes RFC3339 date time format, see [date-time operators](https://mikefarah.gitbook.io/yq/operators/date-time-operators) for more information.", + subdescription: "You can subtract durations from dates. Assumes RFC3339 date time format, see [date-time operators](https://mikefarah.gitbook.io/yq/operators/datetime#date-time-formattings) for more information.", document: `a: 2021-01-01T03:10:00Z`, expression: `.a -= "3h10m"`, expected: []string{