Skip to content

Commit

Permalink
Update the comments of Deprecated flag
Browse files Browse the repository at this point in the history
  • Loading branch information
gouguoyin committed Sep 8, 2023
1 parent 29c80e4 commit ca835e0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions deprecated.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,26 @@ package carbon

import "time"

// Deprecated: It will be removed in the future, use CreateFromStdTime instead.
//
// FromStdTime converts standard time.Time to Carbon.
// Deprecated: It will be removed in the future, CreateFromStdTime is recommended.
// 将标准 time.Time 转换成 Carbon,未来将移除,推荐使用 CreateFromStdTime
// 将标准 time.Time 转换成 Carbon,未来将移除,请使用 CreateFromStdTime 替代
func FromStdTime(tt time.Time) Carbon {
return CreateFromStdTime(tt)
}

// Deprecated: It will be removed in the future, use CreateFromStdTime instead.
//
// Time2Carbon converts standard time.Time to Carbon.
// Deprecated: It will be removed in the future, CreateFromStdTime is recommended.
// 将标准 time.Time 转换成 Carbon,未来将移除,推荐使用 CreateFromStdTime
// 将标准 time.Time 转换成 Carbon,未来将移除,请使用 CreateFromStdTime 替代
func Time2Carbon(tt time.Time) Carbon {
return CreateFromStdTime(tt)
}

// Deprecated: It will be removed in the future, use ToStdTime instead.
//
// Carbon2Time converts Carbon to standard time.Time.
// Deprecated: It will be removed in the future, ToStdTime is recommended.
// 将 Carbon 转换成标准 time.Time,未来将移除,推荐使用 ToStdTime
// 将 Carbon 转换成标准 time.Time,未来将移除,请使用 ToStdTime 替代
func (c Carbon) Carbon2Time() time.Time {
return c.ToStdTime()
}

0 comments on commit ca835e0

Please sign in to comment.