From 0ae153b9b8d3adbe288b937d804d1c7ed6cae9a3 Mon Sep 17 00:00:00 2001 From: gouguoyin <245629560@qq.com> Date: Mon, 25 Nov 2024 16:14:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.cn.md | 32 ++++++++++++++++---------------- README.jp.md | 38 +++++++++++++++++++------------------- README.md | 32 ++++++++++++++++---------------- 3 files changed, 51 insertions(+), 51 deletions(-) diff --git a/README.cn.md b/README.cn.md index 33fec0e..d8b7ba6 100644 --- a/README.cn.md +++ b/README.cn.md @@ -1233,22 +1233,22 @@ person := Person { Name: "gouguoyin", Age: 18, Birthday0: carbon.Now().SubYears(18), - Birthday1: carbon.Now().SubYears(18).ToDateTimeStruct(), - Birthday2: carbon.Now().SubYears(18).ToDateTimeMilliStruct(), - Birthday3: carbon.Now().SubYears(18).ToDateTimeMicroStruct(), - Birthday4: carbon.Now().SubYears(18).ToDateTimeNanoStruct(), - GraduatedAt1: carbon.Now().ToDateStruct(), - GraduatedAt2: carbon.Now().ToDateMilliStruct(), - GraduatedAt3: carbon.Now().ToDateMicroStruct(), - GraduatedAt4: carbon.Now().ToDateNanoStruct(), - OperatedAt1: carbon.Now().ToTimeStruct(), - OperatedAt2: carbon.Now().ToTimeMilliStruct(), - OperatedAt3: carbon.Now().ToTimeMicroStruct(), - OperatedAt4: carbon.Now().ToTimeNanoStruct(), - CreatedAt1: carbon.Now().ToTimestampStruct(), - CreatedAt2: carbon.Now().ToTimestampMilliStruct(), - CreatedAt3: carbon.Now().ToTimestampMicroStruct(), - CreatedAt4: carbon.Now().ToTimestampNanoStruct(), + Birthday1: carbon.NewDateTime(carbon.Now().SubYears(18)), + Birthday2: carbon.NewDateTimeMilli(carbon.Now().SubYears(18)), + Birthday3: carbon.NewDateTimeMicro(carbon.Now().SubYears(18)), + Birthday4: carbon.NewDateTimeNano(carbon.Now().SubYears(18)), + GraduatedAt1: carbon.NewDate(carbon.Now()), + GraduatedAt2: carbon.NewDateMilli(carbon.Now()), + GraduatedAt3: carbon.NewDateMicro(carbon.Now()), + GraduatedAt4: carbon.NewDateNano(carbon.Now()), + OperatedAt1: carbon.NewTime(carbon.Now()), + OperatedAt2: carbon.NewTimeMilli(carbon.Now()), + OperatedAt3: carbon.NewTimeMicro(carbon.Now()), + OperatedAt4: carbon.NewTimeNano(carbon.Now()), + CreatedAt1: carbon.NewTimestamp(carbon.Now()), + CreatedAt2: carbon.NewTimestampMilli(carbon.Now()), + CreatedAt3: carbon.NewTimestampMicro(carbon.Now()), + CreatedAt4: carbon.NewTimestampNano(carbon.Now()), } data, err := json.Marshal(&person) diff --git a/README.jp.md b/README.jp.md index f1040ec..f606c1b 100644 --- a/README.jp.md +++ b/README.jp.md @@ -1230,25 +1230,25 @@ type Person struct { } person := Person { - Name: "gouguoyin", - Age: 18, - Birthday0: carbon.Now().SubYears(18), - Birthday1: carbon.Now().SubYears(18).ToDateTimeStruct(), - Birthday2: carbon.Now().SubYears(18).ToDateTimeMilliStruct(), - Birthday3: carbon.Now().SubYears(18).ToDateTimeMicroStruct(), - Birthday4: carbon.Now().SubYears(18).ToDateTimeNanoStruct(), - GraduatedAt1: carbon.Now().ToDateStruct(), - GraduatedAt2: carbon.Now().ToDateMilliStruct(), - GraduatedAt3: carbon.Now().ToDateMicroStruct(), - GraduatedAt4: carbon.Now().ToDateNanoStruct(), - OperatedAt1: carbon.Now().ToTimeStruct(), - OperatedAt2: carbon.Now().ToTimeMilliStruct(), - OperatedAt3: carbon.Now().ToTimeMicroStruct(), - OperatedAt4: carbon.Now().ToTimeNanoStruct(), - CreatedAt1: carbon.Now().ToTimestampStruct(), - CreatedAt2: carbon.Now().ToTimestampMilliStruct(), - CreatedAt3: carbon.Now().ToTimestampMicroStruct(), - CreatedAt4: carbon.Now().ToTimestampNanoStruct(), + Name: "gouguoyin", + Age: 18, + Birthday0: carbon.Now().SubYears(18), + Birthday1: carbon.NewDateTime(carbon.Now().SubYears(18)), + Birthday2: carbon.NewDateTimeMilli(carbon.Now().SubYears(18)), + Birthday3: carbon.NewDateTimeMicro(carbon.Now().SubYears(18)), + Birthday4: carbon.NewDateTimeNano(carbon.Now().SubYears(18)), + GraduatedAt1: carbon.NewDate(carbon.Now()), + GraduatedAt2: carbon.NewDateMilli(carbon.Now()), + GraduatedAt3: carbon.NewDateMicro(carbon.Now()), + GraduatedAt4: carbon.NewDateNano(carbon.Now()), + OperatedAt1: carbon.NewTime(carbon.Now()), + OperatedAt2: carbon.NewTimeMilli(carbon.Now()), + OperatedAt3: carbon.NewTimeMicro(carbon.Now()), + OperatedAt4: carbon.NewTimeNano(carbon.Now()), + CreatedAt1: carbon.NewTimestamp(carbon.Now()), + CreatedAt2: carbon.NewTimestampMilli(carbon.Now()), + CreatedAt3: carbon.NewTimestampMicro(carbon.Now()), + CreatedAt4: carbon.NewTimestampNano(carbon.Now()), } data, err := json.Marshal(&person) diff --git a/README.md b/README.md index c1eb41b..7c72208 100644 --- a/README.md +++ b/README.md @@ -1227,22 +1227,22 @@ person := Person { Name: "gouguoyin", Age: 18, Birthday0: carbon.Now().SubYears(18), - Birthday1: carbon.Now().SubYears(18).ToDateTimeStruct(), - Birthday2: carbon.Now().SubYears(18).ToDateTimeMilliStruct(), - Birthday3: carbon.Now().SubYears(18).ToDateTimeMicroStruct(), - Birthday4: carbon.Now().SubYears(18).ToDateTimeNanoStruct(), - GraduatedAt1: carbon.Now().ToDateStruct(), - GraduatedAt2: carbon.Now().ToDateMilliStruct(), - GraduatedAt3: carbon.Now().ToDateMicroStruct(), - GraduatedAt4: carbon.Now().ToDateNanoStruct(), - OperatedAt1: carbon.Now().ToTimeStruct(), - OperatedAt2: carbon.Now().ToTimeMilliStruct(), - OperatedAt3: carbon.Now().ToTimeMicroStruct(), - OperatedAt4: carbon.Now().ToTimeNanoStruct(), - CreatedAt1: carbon.Now().ToTimestampStruct(), - CreatedAt2: carbon.Now().ToTimestampMilliStruct(), - CreatedAt3: carbon.Now().ToTimestampMicroStruct(), - CreatedAt4: carbon.Now().ToTimestampNanoStruct(), + Birthday1: carbon.NewDateTime(carbon.Now().SubYears(18)), + Birthday2: carbon.NewDateTimeMilli(carbon.Now().SubYears(18)), + Birthday3: carbon.NewDateTimeMicro(carbon.Now().SubYears(18)), + Birthday4: carbon.NewDateTimeNano(carbon.Now().SubYears(18)), + GraduatedAt1: carbon.NewDate(carbon.Now()), + GraduatedAt2: carbon.NewDateMilli(carbon.Now()), + GraduatedAt3: carbon.NewDateMicro(carbon.Now()), + GraduatedAt4: carbon.NewDateNano(carbon.Now()), + OperatedAt1: carbon.NewTime(carbon.Now()), + OperatedAt2: carbon.NewTimeMilli(carbon.Now()), + OperatedAt3: carbon.NewTimeMicro(carbon.Now()), + OperatedAt4: carbon.NewTimeNano(carbon.Now()), + CreatedAt1: carbon.NewTimestamp(carbon.Now()), + CreatedAt2: carbon.NewTimestampMilli(carbon.Now()), + CreatedAt3: carbon.NewTimestampMicro(carbon.Now()), + CreatedAt4: carbon.NewTimestampNano(carbon.Now()), } data, err := json.Marshal(&person)