From 24893677968989082343ea5daa58d30c41d87070 Mon Sep 17 00:00:00 2001 From: Peleus <245629560@qq.com> Date: Tue, 10 Oct 2023 09:49:46 +0800 Subject: [PATCH] Update content about instantiate model --- README.cn.md | 32 ++++++++++++++++---------------- README.jp.md | 32 ++++++++++++++++---------------- README.md | 36 ++++++++++++++++++------------------ 3 files changed, 50 insertions(+), 50 deletions(-) diff --git a/README.cn.md b/README.cn.md index bd62546e..d5b7078f 100644 --- a/README.cn.md +++ b/README.cn.md @@ -1263,22 +1263,22 @@ type Person struct { person := Person { Name: "gouguoyin", Age: 18, - Birthday1: carbon.DateTime(carbon.Now().SubYears(18)), - Birthday2: carbon.DateTimeMilli(carbon.Now().SubYears(18)), - Birthday3: carbon.DateTimeMicro(carbon.Now().SubYears(18)), - Birthday4: carbon.DateTimeNano(carbon.Now().SubYears(18)), - GraduatedAt1: carbon.Date(carbon.Now()), - GraduatedAt2: carbon.DateMilli(carbon.Now()), - GraduatedAt3: carbon.DateMicro(carbon.Now()), - GraduatedAt4: carbon.DateNano(carbon.Now()), - OperatedAt1: carbon.Time(carbon.Now()), - OperatedAt2: carbon.TimeMilli(carbon.Now()), - OperatedAt3: carbon.TimeMicro(carbon.Now()), - OperatedAt4: carbon.TimeNano(carbon.Now()), - CreatedAt1: carbon.Timestamp(carbon.Now()), - CreatedAt2: carbon.TimestampMilli(carbon.Now()), - CreatedAt3: carbon.TimestampMicro(carbon.Now()), - CreatedAt4: carbon.TimestampNano(carbon.Now()), + Birthday1: carbon.DateTime{carbon.Now().SubYears(18)}, + Birthday2: carbon.DateTimeMilli{carbon.Now().SubYears(18)}, + Birthday3: carbon.DateTimeMicro{carbon.Now().SubYears(18)}, + Birthday4: carbon.DateTimeNano{carbon.Now().SubYears(18)}, + GraduatedAt1: carbon.Date{carbon.Now()}, + GraduatedAt2: carbon.DateMilli{carbon.Now()}, + GraduatedAt3: carbon.DateMicro{carbon.Now()}, + GraduatedAt4: carbon.DateNano{carbon.Now()}, + OperatedAt1: carbon.Time{carbon.Now()}, + OperatedAt2: carbon.TimeMilli{carbon.Now()}, + OperatedAt3: carbon.TimeMicro{carbon.Now()}, + OperatedAt4: carbon.TimeNano{carbon.Now()}, + CreatedAt1: carbon.Timestamp{carbon.Now()}, + CreatedAt2: carbon.TimestampMilli{carbon.Now()}, + CreatedAt3: carbon.TimestampMicro{carbon.Now()}, + CreatedAt4: carbon.TimestampNano{carbon.Now()}, } ``` diff --git a/README.jp.md b/README.jp.md index d46996ca..d6777e6e 100644 --- a/README.jp.md +++ b/README.jp.md @@ -1261,22 +1261,22 @@ type Person struct { person := Person { Name: "gouguoyin", Age: 18, - Birthday1: carbon.DateTime(carbon.Now().SubYears(18)), - Birthday2: carbon.DateTimeMilli(carbon.Now().SubYears(18)), - Birthday3: carbon.DateTimeMicro(carbon.Now().SubYears(18)), - Birthday4: carbon.DateTimeNano(carbon.Now().SubYears(18)), - GraduatedAt1: carbon.Date(carbon.Now()), - GraduatedAt2: carbon.DateMilli(carbon.Now()), - GraduatedAt3: carbon.DateMicro(carbon.Now()), - GraduatedAt4: carbon.DateNano(carbon.Now()), - OperatedAt1: carbon.Time(carbon.Now()), - OperatedAt2: carbon.TimeMilli(carbon.Now()), - OperatedAt3: carbon.TimeMicro(carbon.Now()), - OperatedAt4: carbon.TimeNano(carbon.Now()), - CreatedAt1: carbon.Timestamp(carbon.Now()), - CreatedAt2: carbon.TimestampMilli(carbon.Now()), - CreatedAt3: carbon.TimestampMicro(carbon.Now()), - CreatedAt4: carbon.TimestampNano(carbon.Now()), + Birthday1: carbon.DateTime{carbon.Now().SubYears(18)}, + Birthday2: carbon.DateTimeMilli{carbon.Now().SubYears(18)}, + Birthday3: carbon.DateTimeMicro{carbon.Now().SubYears(18)}, + Birthday4: carbon.DateTimeNano{carbon.Now().SubYears(18)}, + GraduatedAt1: carbon.Date{carbon.Now()}, + GraduatedAt2: carbon.DateMilli{carbon.Now()}, + GraduatedAt3: carbon.DateMicro{carbon.Now()}, + GraduatedAt4: carbon.DateNano{carbon.Now()}, + OperatedAt1: carbon.Time{carbon.Now()}, + OperatedAt2: carbon.TimeMilli{carbon.Now()}, + OperatedAt3: carbon.TimeMicro{carbon.Now()}, + OperatedAt4: carbon.TimeNano{carbon.Now()}, + CreatedAt1: carbon.Timestamp{carbon.Now()}, + CreatedAt2: carbon.TimestampMilli{carbon.Now()}, + CreatedAt3: carbon.TimestampMicro{carbon.Now()}, + CreatedAt4: carbon.TimestampNano{carbon.Now()}, } ``` diff --git a/README.md b/README.md index ffb73970..81918cd8 100644 --- a/README.md +++ b/README.md @@ -1254,24 +1254,24 @@ type Person struct { ###### Instantiate model ```go person := Person { - Name: "gouguoyin", - Age: 18, - Birthday1: carbon.DateTime(carbon.Now().SubYears(18)), - Birthday2: carbon.DateTimeMilli(carbon.Now().SubYears(18)), - Birthday3: carbon.DateTimeMicro(carbon.Now().SubYears(18)), - Birthday4: carbon.DateTimeNano(carbon.Now().SubYears(18)), - GraduatedAt1: carbon.Date(carbon.Now()), - GraduatedAt2: carbon.DateMilli(carbon.Now()), - GraduatedAt3: carbon.DateMicro(carbon.Now()), - GraduatedAt4: carbon.DateNano(carbon.Now()), - OperatedAt1: carbon.Time(carbon.Now()), - OperatedAt2: carbon.TimeMilli(carbon.Now()), - OperatedAt3: carbon.TimeMicro(carbon.Now()), - OperatedAt4: carbon.TimeNano(carbon.Now()), - CreatedAt1: carbon.Timestamp(carbon.Now()), - CreatedAt2: carbon.TimestampMilli(carbon.Now()), - CreatedAt3: carbon.TimestampMicro(carbon.Now()), - CreatedAt4: carbon.TimestampNano(carbon.Now()), + Name: "gouguoyin", + Age: 18, + Birthday1: carbon.DateTime{carbon.Now().SubYears(18)}, + Birthday2: carbon.DateTimeMilli{carbon.Now().SubYears(18)}, + Birthday3: carbon.DateTimeMicro{carbon.Now().SubYears(18)}, + Birthday4: carbon.DateTimeNano{carbon.Now().SubYears(18)}, + GraduatedAt1: carbon.Date{carbon.Now()}, + GraduatedAt2: carbon.DateMilli{carbon.Now()}, + GraduatedAt3: carbon.DateMicro{carbon.Now()}, + GraduatedAt4: carbon.DateNano{carbon.Now()}, + OperatedAt1: carbon.Time{carbon.Now()}, + OperatedAt2: carbon.TimeMilli{carbon.Now()}, + OperatedAt3: carbon.TimeMicro{carbon.Now()}, + OperatedAt4: carbon.TimeNano{carbon.Now()}, + CreatedAt1: carbon.Timestamp{carbon.Now()}, + CreatedAt2: carbon.TimestampMilli{carbon.Now()}, + CreatedAt3: carbon.TimestampMicro{carbon.Now()}, + CreatedAt4: carbon.TimestampNano{carbon.Now()}, } ```