datebin

package
v1.0.1025 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 7 Imported by: 6

Documentation

Index

Constants

View Source
const (
	// 皮秒[ps] [Picosecond = Nanosecond * 0.001]
	Picosecond = time.Nanosecond / 1000
	// 纳秒[ns] [Nanosecond time.Duration = 1]
	Nanosecond = time.Nanosecond
	// 微妙[µs] [Microsecond = Nanosecond * 1000]
	Microsecond = time.Microsecond
	// 毫秒[ms] [Millisecond = Microsecond * 1000]
	Millisecond = time.Millisecond
	// 秒[s]    [Second = Millisecond * 1000]
	Second = time.Second
	// 分钟[m]  [Minute = Second * 60]
	Minute = time.Minute
	// 小时[h]  [Hour = Minute * 60]
	Hour = time.Hour
	// 天[d]    [Day = Hour * 24]
	Day = time.Hour * 24
	// 周[w]    [Week = Day * 7]
	Week = Day * 7
)

时间常量 time const

View Source
const (
	Local = "Local"
	CET   = "CET"
	EET   = "EET"
	EST   = "EST"
	GMT   = "GMT"
	UTC   = "UTC"
	UCT   = "UCT"
	MST   = "MST"

	Cuba      = "Cuba"      // 古巴
	Egypt     = "Egypt"     // 埃及
	Eire      = "Eire"      // 爱尔兰
	Greenwich = "Greenwich" // 格林尼治
	Iceland   = "Iceland"   // 冰岛
	Iran      = "Iran"      // 伊朗
	Israel    = "Israel"    // 以色列
	Jamaica   = "Jamaica"   // 牙买加
	Japan     = "Japan"     // 日本
	Libya     = "Libya"     // 利比亚
	Poland    = "Poland"    // 波兰
	Portugal  = "Portugal"  // 葡萄牙
	PRC       = "PRC"       // 中国
	Singapore = "Singapore" // 新加坡
	Turkey    = "Turkey"    // 土耳其

	Majuro     = "Pacific/Majuro"      // 马朱罗
	Midway     = "Pacific/Midway"      // 中途岛
	Honolulu   = "Pacific/Honolulu"    // 檀香山
	Shanghai   = "Asia/Shanghai"       // 上海
	Chongqing  = "Asia/Chongqing"      // 重庆
	Harbin     = "Asia/Harbin"         // 哈尔滨
	HongKong   = "Asia/Hong_Kong"      // 香港
	Macao      = "Asia/Macao"          // 澳门
	Taipei     = "Asia/Taipei"         // 台北
	Tokyo      = "Asia/Tokyo"          // 日本-东京
	Saigon     = "Asia/Saigon"         // 西贡
	Seoul      = "Asia/Seoul"          // 首尔
	Bangkok    = "Asia/Bangkok"        // 泰国-曼谷
	HoChiMinh  = "Asia/Ho_Chi_Minh"    // 越南
	Pyongyang  = "Asia/Pyongyang"      // 韩国
	Dubai      = "Asia/Dubai"          // 迪拜
	NewYork    = "America/New_York"    // 纽约
	LosAngeles = "America/Los_Angeles" // 洛杉矶
	Chicago    = "America/Chicago"     // 芝加哥
	Santiago   = "America/Santiago"    // 圣地亚哥
	SaoPaulo   = "America/Sao_Paulo"   // 圣保罗
	Moscow     = "Europe/Moscow"       // 莫斯科
	London     = "Europe/London"       // 欧洲-伦敦
	Berlin     = "Europe/Berlin"       // 柏林
	Paris      = "Europe/Paris"        // 巴黎
	Rome       = "Europe/Rome"         // 罗马
	Athens     = "Europe/Athens"       // 东欧标准时间 (雅典)
	Helsinki   = "Europe/Helsinki"     // 东欧标准时间 (赫尔辛基)
	Minsk      = "Europe/Minsk"        // 明斯克
	Amsterdam  = "Europe/Amsterdam"    // 中欧标准时间 (阿姆斯特丹)
)

时区常量 timezones const

View Source
const (
	Monday    = "Monday"
	Tuesday   = "Tuesday"
	Wednesday = "Wednesday"
	Thursday  = "Thursday"
	Friday    = "Friday"
	Saturday  = "Saturday"
	Sunday    = "Sunday"
)

周常量 week const

View Source
const (
	January   = "January"   // 一月
	February  = "February"  // 二月
	March     = "March"     // 三月
	April     = "April"     // 四月
	May       = "May"       // 五月
	June      = "June"      // 六月
	July      = "July"      // 七月
	August    = "August"    // 八月
	September = "September" // 九月
	October   = "October"   // 十月
	November  = "November"  // 十一月
	December  = "December"  // 十二月
)

月份常量 month const

View Source
const (
	YearsPerMillennium = 1000 // 每千年1000年
	YearsPerCentury    = 100  // 每世纪100年
	YearsPerDecade     = 10   // 每十年10年
	QuartersPerYear    = 4    // 每年4季度
	MonthsPerYear      = 12   // 每年12月
	MonthsPerQuarter   = 3    // 每季度3月
	WeeksPerNormalYear = 52   // 每常规年52周

	WeeksPerMonth              = 4       // 每月4周
	DaysPerLeapYear            = 366     // 每闰年366天
	DaysPerNormalYear          = 365     // 每常规年365天
	DaysPerWeek                = 7       // 每周7天
	HoursPerWeek               = 168     // 每周168小时
	HoursPerDay                = 24      // 每天24小时
	MinutesPerDay              = 1440    // 每天1440分钟
	MinutesPerHour             = 60      // 每小时60分钟
	SecondsPerWeek             = 604800  // 每周604800秒
	SecondsPerDay              = 86400   // 每天86400秒
	SecondsPerHour             = 3600    // 每小时3600秒
	SecondsPerMinute           = 60      // 每分钟60秒
	MillisecondsPerSecond      = 1000    // 每秒1000毫秒
	MicrosecondsPerMillisecond = 1000    // 每毫秒1000微秒
	MicrosecondsPerSecond      = 1000000 // 每秒1000000微秒
)

数字常量 types const

View Source
const (
	AnsicFormat              = time.ANSIC
	UnixDateFormat           = time.UnixDate
	RubyDateFormat           = time.RubyDate
	KitchenFormat            = time.Kitchen
	RFC822Format             = time.RFC822
	RFC822ZFormat            = time.RFC822Z
	RFC850Format             = time.RFC850
	RFC1123Format            = time.RFC1123
	RFC1123ZFormat           = time.RFC1123Z
	RssFormat                = time.RFC1123Z
	RFC2822Format            = time.RFC1123Z
	RFC3339Format            = time.RFC3339
	RFC3339MilliFormat       = "2006-01-02T15:04:05.999Z07:00"
	RFC3339MicroFormat       = "2006-01-02T15:04:05.999999Z07:00"
	RFC3339NanoFormat        = "2006-01-02T15:04:05.999999999Z07:00"
	W3CFormat                = RFC3339Format
	AtomFormat               = RFC3339Format
	StampFormat              = time.Stamp
	StampMilliFormat         = time.StampMilli
	StampMicroFormat         = time.StampMicro
	StampNanoFormat          = time.StampNano
	CookieFormat             = "Monday, 02-Jan-2006 15:04:05 MST"
	RFC1036Format            = "Mon, 02 Jan 06 15:04:05 -0700"
	RFC7231Format            = "Mon, 02 Jan 2006 15:04:05 GMT"
	ISO8601Format            = "2006-01-02T15:04:05-07:00"
	ISO8601MilliFormat       = "2006-01-02T15:04:05.999-07:00"
	ISO8601MicroFormat       = "2006-01-02T15:04:05.999999-07:00"
	ISO8601NanoFormat        = "2006-01-02T15:04:05.999999999-07:00"
	ISO8601ZuluFormat        = "2006-01-02T15:04:05Z"
	ISO8601ZuluMilliFormat   = "2006-01-02T15:04:05.999Z"
	ISO8601ZuluMicroFormat   = "2006-01-02T15:04:05.999999Z"
	ISO8601ZuluNanoFormat    = "2006-01-02T15:04:05.999999999Z"
	DayDateTimeFormat        = "Mon, Jan 2, 2006 3:04 PM"
	FormattedDateFormat      = "Jan 2, 2006"
	FormattedDayDateFormat   = "Mon, Jan 2, 2006"
	DatetimeNanoFormat       = "2006-01-02 15:04:05.999999999"
	DatetimeMicroFormat      = "2006-01-02 15:04:05.999999"
	DatetimeMilliFormat      = "2006-01-02 15:04:05.999"
	DatetimeFormat           = "2006-01-02 15:04:05"
	DateFormat               = "2006-01-02"
	TimeFormat               = "15:04:05"
	HourMinuteFormat         = "15:04"
	HourFormat               = "15"
	ShortDatetimeNanoFormat  = "20060102150405.999999999"
	ShortDatetimeMicroFormat = "20060102150405.999999"
	ShortDatetimeMilliFormat = "20060102150405.999"
	ShortDatetimeFormat      = "20060102150405"
	ShortDateFormat          = "20060102"
	ShortTimeFormat          = "150405"
	ShortHourMinuteFormat    = "1504"
)

时间格式化常量 formats const

Variables

View Source
var (
	// 解析的格式字符
	// parse format list
	PaseFormats = map[string]string{
		"D": "Mon",
		"d": "02",
		"N": "Monday",
		"j": "2",
		"l": "Monday",
		"z": "__2",

		"F": "January",
		"m": "01",
		"M": "Jan",
		"n": "1",

		"Y": "2006",
		"y": "06",

		"a": "pm",
		"A": "PM",
		"g": "3",
		"G": "=G=15",
		"h": "03",
		"H": "15",
		"i": "04",
		"s": "05",
		"u": "000000",

		"O": "-0700",
		"P": "-07:00",
		"T": "MST",

		"c": "2006-01-02T15:04:05Z07:00",
		"r": "Mon, 02 Jan 2006 15:04:05 -0700",
	}

	// 输出的格式字符
	// output format list
	ToFormats = map[string]string{
		"D": "Mon",
		"d": "02",
		"j": "2",
		"l": "Monday",

		"F": "January",
		"m": "01",
		"M": "Jan",
		"n": "1",

		"Y": "2006",
		"y": "06",

		"a": "pm",
		"A": "PM",
		"g": "3",
		"h": "03",
		"H": "15",
		"i": "04",
		"s": "05",

		"O": "-0700",
		"P": "-07:00",
		"T": "MST",

		"c": "2006-01-02T15:04:05Z07:00",
		"r": "Mon, 02 Jan 2006 15:04:05 -0700",
	}

	// 月份
	// Month list
	Months = map[int]time.Month{
		1:  time.January,
		2:  time.February,
		3:  time.March,
		4:  time.April,
		5:  time.May,
		6:  time.June,
		7:  time.July,
		8:  time.August,
		9:  time.September,
		10: time.October,
		11: time.November,
		12: time.December,
	}

	// 周列表
	// Weekday list
	Weekdays = []string{
		"Sunday",
		"Monday",
		"Tuesday",
		"Wednesday",
		"Thursday",
		"Friday",
		"Saturday",
	}
)

Functions

func NowDateString

func NowDateString(timezone ...string) string

当前日期字符 get now time Date string

func NowDatetimeString

func NowDatetimeString(timezone ...string) string

当前日期时间字符 get now time Datetime string

func NowTimeString

func NowTimeString(timezone ...string) string

当前时间字符 get now time Time string

func NowTimestamp added in v1.0.1021

func NowTimestamp(timezone ...string) int64

当前时间戳 get now time Timestamp

func SetTimezone added in v1.0.1009

func SetTimezone(timezone string)

全局设置时区 Set global Timezone

func StdTimeToTimestamp added in v1.0.1021

func StdTimeToTimestamp(t time.Time, timezone ...string) int64

标准时间转换为时间戳 std time to timestamp

func StringToStdTime added in v1.0.1021

func StringToStdTime(date string, format ...string) time.Time

时间字符转为标准时间 date string to std time

func StringToTimestamp

func StringToTimestamp(date string, format ...string) int64

时间字符转为时间戳 date string to timestamp

func TimestampToStdTime added in v1.0.1021

func TimestampToStdTime(timestamp int64, timezone ...string) time.Time

时间戳转为标准时间 timestamp to std time

Types

type Date

type Date Datebin

日期 Date struct

func (Date) MarshalJSON added in v1.0.1006

func (this Date) MarshalJSON() ([]byte, error)

转换为 json Marshal to JSON

func (*Date) UnmarshalJSON added in v1.0.1006

func (this *Date) UnmarshalJSON(val []byte) error

解析 json Unmarshal JSON data

type DateTime added in v1.0.1006

type DateTime Datebin

日期时间 DateTime struct

func (DateTime) MarshalJSON added in v1.0.1006

func (this DateTime) MarshalJSON() ([]byte, error)

转换为 json Marshal to JSON

func (*DateTime) UnmarshalJSON added in v1.0.1006

func (this *DateTime) UnmarshalJSON(val []byte) error

解析 json Unmarshal JSON data

type Datebin

type Datebin struct {

	// 错误 / error list
	Errors []error
	// contains filtered or unexported fields
}

*

  • 日期 / Datebin *
  • @create 2022-3-6
  • @author deatil

func FromDate added in v1.0.1005

func FromDate(year, month, day int, timezone ...string) Datebin

输入日期 create from date

func FromDatetime added in v1.0.1005

func FromDatetime(year, month, day, hour, minute, second int, timezone ...string) Datebin

输入日期和时间 create from date_time

func FromDatetimeWithMicrosecond added in v1.0.1005

func FromDatetimeWithMicrosecond(year, month, day, hour, minute, second, microsecond int, timezone ...string) Datebin

输入日期时间带微秒 create from date_time with microsecond

func FromDatetimeWithMillisecond added in v1.0.1005

func FromDatetimeWithMillisecond(year, month, day, hour, minute, second, millisecond int, timezone ...string) Datebin

输入日期时间带毫秒 create from date_time with millisecond

func FromDatetimeWithNanosecond added in v1.0.1005

func FromDatetimeWithNanosecond(year, month, day, hour, minute, second, nanosecond int, timezone ...string) Datebin

输入日期时间带纳秒 create from date_time with nanosecond

func FromStdTime added in v1.0.1017

func FromStdTime(t time.Time, timezone ...string) Datebin

输入标准时间 create from std time

func FromStdUnix added in v1.0.1017

func FromStdUnix(second int64, nsec int64, timezone ...string) Datebin

输入标准时间戳带毫秒 create from std unix

func FromTime added in v1.0.1005

func FromTime(hour, minute, second int, timezone ...string) Datebin

输入时间 create from time

func FromTimestamp added in v1.0.1005

func FromTimestamp(timestamp int64, timezone ...string) Datebin

输入时间戳 create from std timestamp

func New added in v1.0.1002

func New() Datebin

New Datebin

func NewDatebin

func NewDatebin() Datebin

New Datebin

func Now

func Now(timezone ...string) Datebin

当前 get Now time

func Parse

func Parse(date string, timezone ...string) Datebin

解析时间字符 Parse date string

func ParseDatetimeString added in v1.0.1005

func ParseDatetimeString(date string, format ...string) Datebin

用格式化字符或者布局字符解析时间字符 Parse date string with format or layout

func ParseWithFormat added in v1.0.1002

func ParseWithFormat(date string, format string, timezone ...string) Datebin

用格式化字符解析时间字符 Parse date string with format

func ParseWithLayout added in v1.0.1002

func ParseWithLayout(date string, layout string, timezone ...string) Datebin

用布局字符解析时间字符 Parse date string with layout

func Today

func Today(timezone ...string) Datebin

今天 get Today time

func Tomorrow

func Tomorrow(timezone ...string) Datebin

明天 get Tomorrow time

func Yesterday

func Yesterday(timezone ...string) Datebin

昨天 get Yesterday time

func (Datebin) AddBusinessDays added in v1.0.1021

func (this Datebin) AddBusinessDays(days int) Datebin

将工作日添加到日期 add Business Days

func (Datebin) AddCenturies

func (this Datebin) AddCenturies(n uint) Datebin

后 n 百年 add n Centuries

func (Datebin) AddCenturiesNoOverflow

func (this Datebin) AddCenturiesNoOverflow(n uint) Datebin

后 n 百年 add n Centuries noOverflow

func (Datebin) AddCentury

func (this Datebin) AddCentury() Datebin

后一百年 add one Century

func (Datebin) AddCenturyNoOverflow

func (this Datebin) AddCenturyNoOverflow() Datebin

后一百年 add one Century noOverflow

func (Datebin) AddDay

func (this Datebin) AddDay() Datebin

后一天 Add one Day

func (Datebin) AddDays

func (this Datebin) AddDays(n uint) Datebin

后 n 天 Add n Days

func (Datebin) AddDecade

func (this Datebin) AddDecade() Datebin

后十年 add one Decade

func (Datebin) AddDecadeNoOverflow

func (this Datebin) AddDecadeNoOverflow() Datebin

后十年 add one Decade noOverflow

func (Datebin) AddDecades

func (this Datebin) AddDecades(n uint) Datebin

后 n 十年 Add n Decades

func (Datebin) AddDecadesNoOverflow

func (this Datebin) AddDecadesNoOverflow(n uint) Datebin

后 n 十年 Add n Decades noOverflow

func (Datebin) AddDuration

func (this Datebin) AddDuration(duration string) Datebin

按照持续时长字符串增加时间 add Duration time

func (Datebin) AddHour

func (this Datebin) AddHour() Datebin

后一小时 Add one Hour

func (Datebin) AddHours

func (this Datebin) AddHours(n uint) Datebin

后 n 小时 Add n Hours

func (Datebin) AddMicrosecond

func (this Datebin) AddMicrosecond() Datebin

后一微妙 Add one Microsecond

func (Datebin) AddMicroseconds

func (this Datebin) AddMicroseconds(n uint) Datebin

后 n 微妙 Add n Microseconds

func (Datebin) AddMillisecond

func (this Datebin) AddMillisecond() Datebin

后一毫秒 Add one Millisecond

func (Datebin) AddMilliseconds

func (this Datebin) AddMilliseconds(n uint) Datebin

后 n 毫秒 Add n Milliseconds

func (Datebin) AddMinute

func (this Datebin) AddMinute() Datebin

后一分钟 Add one Minute

func (Datebin) AddMinutes

func (this Datebin) AddMinutes(n uint) Datebin

后 n 分钟 Add n Minutes

func (Datebin) AddMonth

func (this Datebin) AddMonth() Datebin

后一月 Add one Month

func (Datebin) AddMonthNoOverflow

func (this Datebin) AddMonthNoOverflow() Datebin

后一月 Add one Month NoOverflow

func (Datebin) AddMonths

func (this Datebin) AddMonths(n uint) Datebin

后 n 月 Add n Months

func (Datebin) AddMonthsNoOverflow

func (this Datebin) AddMonthsNoOverflow(months uint) Datebin

后 n 月 (月份不溢出) Add n Months NoOverflow

func (Datebin) AddNanosecond

func (this Datebin) AddNanosecond() Datebin

后一纳秒 Add one Nanosecond

func (Datebin) AddNanoseconds

func (this Datebin) AddNanoseconds(n uint) Datebin

后 n 纳秒 Add n Nanoseconds

func (Datebin) AddQuarter

func (this Datebin) AddQuarter() Datebin

后一季度 Add one Quarter

func (Datebin) AddQuarterNoOverflow

func (this Datebin) AddQuarterNoOverflow() Datebin

后一季度 Add one Quarter NoOverflow

func (Datebin) AddQuarters

func (this Datebin) AddQuarters(n uint) Datebin

后 n 季度 Add n Quarters

func (Datebin) AddQuartersNoOverflow

func (this Datebin) AddQuartersNoOverflow(n uint) Datebin

后 n 季度 Add n Quarters NoOverflow

func (Datebin) AddSecond

func (this Datebin) AddSecond() Datebin

后一秒 Add one Second

func (Datebin) AddSeconds

func (this Datebin) AddSeconds(n uint) Datebin

后 n 一秒 Add n Seconds

func (Datebin) AddWeekday

func (this Datebin) AddWeekday() Datebin

后一周 Add one Weekday

func (Datebin) AddWeekdays

func (this Datebin) AddWeekdays(n uint) Datebin

后 n 周 Add n Weekdays

func (Datebin) AddYear

func (this Datebin) AddYear() Datebin

后一年 Add one Year

func (Datebin) AddYearNoOverflow

func (this Datebin) AddYearNoOverflow() Datebin

后一年 Add one Year NoOverflow

func (Datebin) AddYears

func (this Datebin) AddYears(n uint) Datebin

后 n 年 Add n Years

func (Datebin) AddYearsNoOverflow

func (this Datebin) AddYearsNoOverflow(years uint) Datebin

后 n 年 (月份不溢出) Add n Years NoOverflow

func (Datebin) Age

func (this Datebin) Age() int

年龄,可为负数 get Age data

func (Datebin) AppendError added in v1.0.1013

func (this Datebin) AppendError(err ...error) Datebin

添加错误 append error

func (Datebin) Average

func (this Datebin) Average(d Datebin) Datebin

平均值 get a Average time from a and b

func (Datebin) Avg

func (this Datebin) Avg(d Datebin) Datebin

平均值 get a Average time from a and b

func (Datebin) Between

func (this Datebin) Between(start Datebin, end Datebin) bool

是否在两个时间之间(不包括这两个时间) if a Between start and end

func (Datebin) BetweenIncludEnd

func (this Datebin) BetweenIncludEnd(start Datebin, end Datebin) bool

是否在两个时间之间(包括结束时间) if a BetweenIncludEnd start and end

func (Datebin) BetweenIncludStart

func (this Datebin) BetweenIncludStart(start Datebin, end Datebin) bool

是否在两个时间之间(包括开始时间) if a BetweenIncludStart start and end

func (Datebin) BetweenIncluded

func (this Datebin) BetweenIncluded(start Datebin, end Datebin) bool

是否在两个时间之间(包括这两个时间) if a BetweenIncluded start and end

func (Datebin) Century

func (this Datebin) Century() int

获取当前世纪 get Century data

func (Datebin) CenturyEnd

func (this Datebin) CenturyEnd() Datebin

当前百年结束 get the Century end

func (Datebin) CenturyStart

func (this Datebin) CenturyStart() Datebin

当前百年开始 get the Century start

func (Datebin) Closest

func (this Datebin) Closest(a Datebin, b Datebin) Datebin

取 a 和 b 中与当前时间最近的一个 get a Closest time from a and b

func (Datebin) Date added in v1.0.1002

func (this Datebin) Date() (year, month, day int)

返回年月日数据 get year, month, day data

func (Datebin) Datetime added in v1.0.1002

func (this Datebin) Datetime() (year, month, day, hour, minute, second int)

返回年月日时分秒数据 get year, month, day, hour, minute, second data

func (Datebin) DatetimeWithMicrosecond added in v1.0.1003

func (this Datebin) DatetimeWithMicrosecond() (year, month, day, hour, minute, second, microsecond int)

返回年月日时分秒数据带微秒 get year, month, day, hour, minute, second, microsecond data

func (Datebin) DatetimeWithMillisecond added in v1.0.1003

func (this Datebin) DatetimeWithMillisecond() (year, month, day, hour, minute, second, millisecond int)

返回年月日时分秒数据带毫秒 get year, month, day, hour, minute, second, millisecond data

func (Datebin) DatetimeWithNanosecond added in v1.0.1003

func (this Datebin) DatetimeWithNanosecond() (year, month, day, hour, minute, second, nanosecond int)

返回年月日时分秒数据带纳秒 get year, month, day, hour, minute, second, nanosecond data

func (Datebin) Day

func (this Datebin) Day() int

获取当前日 get Day data

func (Datebin) DayEnd

func (this Datebin) DayEnd() Datebin

本日结束时间 get the Day end

func (Datebin) DayOfMonth

func (this Datebin) DayOfMonth() int

获取本月的第几天 get Day Of Month

func (Datebin) DayOfWeek

func (this Datebin) DayOfWeek() int

获取本周的第几天 get Day Of Week

func (Datebin) DayOfWeekDates added in v1.0.1021

func (this Datebin) DayOfWeekDates(day time.Weekday) []Datebin

获取给定月份的星期几的日期 get DayOfWeek datas

func (Datebin) DayOfYear

func (this Datebin) DayOfYear() int

获取本年的第几天 get Day Of Year

func (Datebin) DayStart

func (this Datebin) DayStart() Datebin

本日开始时间 get the Day start

func (Datebin) DaysInMonth

func (this Datebin) DaysInMonth() int

获取本月的总天数 get Days In Month

func (Datebin) Decade

func (this Datebin) Decade() int

获取当前年代 get Decade data

func (Datebin) DecadeEnd

func (this Datebin) DecadeEnd() Datebin

当前十年结束 get the Decade end

func (Datebin) DecadeStart

func (this Datebin) DecadeStart() Datebin

当前十年开始 get the Decade start

func (Datebin) Diff

func (this Datebin) Diff(date Datebin) DiffTime

相差时间判断 get DiffTime struct

func (Datebin) Eq

func (this Datebin) Eq(d Datebin) bool

判断判断 a 等于 d if a Eq d

func (Datebin) Error

func (this Datebin) Error() error

获取错误 output errors

func (Datebin) Farthest

func (this Datebin) Farthest(a Datebin, b Datebin) Datebin

取 a 和 b 中与当前时间最远的一个 get a Farthest time from a and b

func (Datebin) FixedZone added in v1.0.1021

func (this Datebin) FixedZone(name string, offset int) Datebin

FixedZone 设置时区 FixedZone returns a Location that always uses the given zone name and offset (seconds east of UTC).

func (Datebin) Format

func (this Datebin) Format(layout string, timezone ...string) string

输出格式化字符的时间字符串 output datetime with sign

func (Datebin) FromDate added in v1.0.1021

func (this Datebin) FromDate(year, month, day int, timezone ...string) Datebin

输入日期 create from date

func (Datebin) FromDatetime added in v1.0.1021

func (this Datebin) FromDatetime(year, month, day, hour, minute, second int, timezone ...string) Datebin

输入日期和时间 create from date_time

func (Datebin) FromDatetimeWithMicrosecond added in v1.0.1021

func (this Datebin) FromDatetimeWithMicrosecond(year, month, day, hour, minute, second, microsecond int, timezone ...string) Datebin

输入日期时间带微秒 create from date_time with microsecond

func (Datebin) FromDatetimeWithMillisecond added in v1.0.1021

func (this Datebin) FromDatetimeWithMillisecond(year, month, day, hour, minute, second, millisecond int, timezone ...string) Datebin

输入日期时间带毫秒 create from date_time with millisecond

func (Datebin) FromDatetimeWithNanosecond added in v1.0.1021

func (this Datebin) FromDatetimeWithNanosecond(year, month, day, hour, minute, second, nanosecond int, timezone ...string) Datebin

输入日期时间带纳秒 create from date_time with nanosecond

func (Datebin) FromStdTime added in v1.0.1021

func (this Datebin) FromStdTime(t time.Time, timezone ...string) Datebin

输入标准时间 create from std time

func (Datebin) FromStdUnix added in v1.0.1021

func (this Datebin) FromStdUnix(second int64, nsec int64, timezone ...string) Datebin

输入标准时间戳带毫秒 create from std unix

func (Datebin) FromTime added in v1.0.1021

func (this Datebin) FromTime(hour, minute, second int, timezone ...string) Datebin

输入时间 create from time

func (Datebin) FromTimestamp added in v1.0.1021

func (this Datebin) FromTimestamp(timestamp int64, timezone ...string) Datebin

输入时间戳 create from std timestamp

func (Datebin) GetErrors added in v1.0.1013

func (this Datebin) GetErrors() []error

获取错误信息 Get Errors

func (Datebin) GetLocation

func (this Datebin) GetLocation() *time.Location

获取时区 Get Location struct

func (Datebin) GetLocationString

func (this Datebin) GetLocationString() string

获取时区字符 Get Location String

func (Datebin) GetOffset

func (this Datebin) GetOffset() int

获取距离UTC时区的偏移量,单位秒 Get Zone Offset

func (Datebin) GetTime

func (this Datebin) GetTime() time.Time

获取时间 Get Time

func (Datebin) GetTimezone

func (this Datebin) GetTimezone() string

获取时区 Zone 名称 Get Timezone string

func (Datebin) GetWeekStartAt

func (this Datebin) GetWeekStartAt() time.Weekday

获取周开始时间 Get Start Week

func (Datebin) GoString added in v1.0.1021

func (this Datebin) GoString() string

GoString implements fmt.GoStringer and formats t to be printed in Go source code.

func (*Datebin) GobDecode added in v1.0.1019

func (this *Datebin) GobDecode(data []byte) error

GobDecode implements the gob.GobDecoder interface.

func (Datebin) GobEncode added in v1.0.1019

func (this Datebin) GobEncode() ([]byte, error)

GobEncode implements the gob.GobEncoder interface.

func (Datebin) Gt

func (this Datebin) Gt(d Datebin) bool

判断判断 a 大于 d if a Gt d

func (Datebin) Gte

func (this Datebin) Gte(d Datebin) bool

判断判断 a 大于等于 d if a Gte d

func (Datebin) Hour

func (this Datebin) Hour() int

获取当前小时 get Hour data

func (Datebin) HourEnd

func (this Datebin) HourEnd() Datebin

小时结束时间 get the Hour end

func (Datebin) HourStart

func (this Datebin) HourStart() Datebin

小时开始时间 get the Hour start

func (Datebin) ISOWeek added in v1.0.1021

func (this Datebin) ISOWeek() int

获取 ISO 星期几数字 get ISOWeek data

func (Datebin) ISOYear added in v1.0.1021

func (this Datebin) ISOYear() int

获取 ISO 当前年 get ISOYear data

func (Datebin) IsAM added in v1.0.1021

func (this Datebin) IsAM() bool

是否是上午 if the time is AM ?

func (Datebin) IsApril

func (this Datebin) IsApril() bool

是否是四月 if the time is April ?

func (Datebin) IsAquariusStar

func (this Datebin) IsAquariusStar() bool

水瓶座 if the time is Aquarius Star ?

func (Datebin) IsAriesStar

func (this Datebin) IsAriesStar() bool

白羊座 if the time is Aries Star ?

func (Datebin) IsAugust

func (this Datebin) IsAugust() bool

是否是八月 if the time is August ?

func (Datebin) IsAutumn

func (this Datebin) IsAutumn() bool

是否是秋季 if the time is Autumn ?

func (Datebin) IsCancerStar

func (this Datebin) IsCancerStar() bool

巨蟹座 if the time is Cancer Star ?

func (Datebin) IsCapricornStar

func (this Datebin) IsCapricornStar() bool

摩羯座 if the time is Capricorn Star ?

func (Datebin) IsCurrentMonth

func (this Datebin) IsCurrentMonth() bool

是否是当月 if the time is Current Month ?

func (Datebin) IsCurrentYear

func (this Datebin) IsCurrentYear() bool

是否是当年 if the time is Current Year ?

func (Datebin) IsDST added in v1.0.1017

func (this Datebin) IsDST() bool

是否是夏令时 if the time is DST timezone ? IsDST reports whether the time in the configured location is in Daylight Savings Time.

func (Datebin) IsDecember

func (this Datebin) IsDecember() bool

是否是十二月 if the time is December ?

func (Datebin) IsEndOfDay

func (this Datebin) IsEndOfDay() bool

是否当天结束 if the time is day end time ?

func (Datebin) IsEndOfDayWithMicrosecond

func (this Datebin) IsEndOfDayWithMicrosecond() bool

是否当天结束带微妙 if the time is end of day with microsecond ?

func (Datebin) IsFebruary

func (this Datebin) IsFebruary() bool

是否是二月 if the time is February ?

func (Datebin) IsFriday

func (this Datebin) IsFriday() bool

是否是周五 if the time is Friday ?

func (Datebin) IsFuture

func (this Datebin) IsFuture() bool

是否是未来时间 if the time is Future time ?

func (Datebin) IsGeminiStar

func (this Datebin) IsGeminiStar() bool

双子座 if the time is Gemini Star ?

func (Datebin) IsInvalid

func (this Datebin) IsInvalid() bool

是否是无效时间 if the time is Invalid time ?

func (Datebin) IsJanuary

func (this Datebin) IsJanuary() bool

是否是一月 if the time is January ?

func (Datebin) IsJuly

func (this Datebin) IsJuly() bool

是否是七月 if the time is July ?

func (Datebin) IsJune

func (this Datebin) IsJune() bool

是否是六月 if the time is June ?

func (Datebin) IsLastOfMonth

func (this Datebin) IsLastOfMonth() bool

是否是当前月最后一天 if the time is Month's Last day ?

func (Datebin) IsLatelyMonth

func (this Datebin) IsLatelyMonth() bool

时间是否是当前最近的一个月 if the time is Lately Month ?

func (Datebin) IsLatelyWeek

func (this Datebin) IsLatelyWeek() bool

时间是否是当前最近的一周 if the time is LatelyWeek ?

func (Datebin) IsLeapYear

func (this Datebin) IsLeapYear() bool

是否是闰年 if the time is LeapYear ?

func (Datebin) IsLeoStar

func (this Datebin) IsLeoStar() bool

狮子座 if the time is Leo Star ?

func (Datebin) IsLibraStar

func (this Datebin) IsLibraStar() bool

天秤座 if the time is Libra Star ?

func (Datebin) IsLocal

func (this Datebin) IsLocal() bool

是否是本地时区 if the time is Local timezone ?

func (Datebin) IsLongYear

func (this Datebin) IsLongYear() bool

是否是长年 if the time is LongYear ?

func (Datebin) IsMarch

func (this Datebin) IsMarch() bool

是否是三月 if the time is March ?

func (Datebin) IsMay

func (this Datebin) IsMay() bool

是否是五月 if the time is May ?

func (Datebin) IsMidday

func (this Datebin) IsMidday(midDay ...string) bool

是否是中午 if the time is midday time ?

func (Datebin) IsMidnight

func (this Datebin) IsMidnight() bool

是否是半夜 if the time is midnight time ?

func (Datebin) IsMonday

func (this Datebin) IsMonday() bool

是否是周一 if the time is Monday ?

func (Datebin) IsNovember

func (this Datebin) IsNovember() bool

是否是十一月 if the time is November ?

func (Datebin) IsNow

func (this Datebin) IsNow() bool

是否是当前时间 if the time is Now time ?

func (Datebin) IsOctober

func (this Datebin) IsOctober() bool

是否是十月 if the time is October ?

func (Datebin) IsPM added in v1.0.1021

func (this Datebin) IsPM() bool

是否是下午 if the time is PM ?

func (Datebin) IsPast

func (this Datebin) IsPast() bool

是否是过去时间 if the time is Past time ?

func (Datebin) IsPiscesStar

func (this Datebin) IsPiscesStar() bool

双鱼座 if the time is Pisces Star ?

func (Datebin) IsSagittariusStar

func (this Datebin) IsSagittariusStar() bool

射手座 if the time is Sagittarius Star ?

func (Datebin) IsSameAs

func (this Datebin) IsSameAs(format string, date Datebin) bool

通过格式字符比对是否相等 if a and b Is Same with format string ?

func (Datebin) IsSameAsWithLayout added in v1.0.1009

func (this Datebin) IsSameAsWithLayout(layout string, date Datebin) bool

通过布局字符比对是否相等 if a and b Is Same With Layout string ?

func (Datebin) IsSameBirthday

func (this Datebin) IsSameBirthday(date Datebin) bool

是否是相同生日日期 if a and b Is Same Birthday ?

func (Datebin) IsSameDay

func (this Datebin) IsSameDay(date Datebin) bool

是否同一天 if a and b Is Same Day ?

func (Datebin) IsSameHour

func (this Datebin) IsSameHour(date Datebin) bool

是否同一小时 if a and b Is Same Hour ?

func (Datebin) IsSameMinute

func (this Datebin) IsSameMinute(date Datebin) bool

是否同一分钟 if a and b Is Same Minute ?

func (Datebin) IsSameMonth

func (this Datebin) IsSameMonth(date Datebin) bool

是否是同一个月 if a and b Is Same Month ?

func (Datebin) IsSameMonthDay

func (this Datebin) IsSameMonthDay(date Datebin) bool

是否是同一个月的同一天 if a and b Is Same Month and Day ?

func (Datebin) IsSameSecond

func (this Datebin) IsSameSecond(date Datebin) bool

是否同一秒 if a and b Is Same Second ?

func (Datebin) IsSameUnit

func (this Datebin) IsSameUnit(unit string, date Datebin) bool

通过预设格式字符比对是否相等 unit 预设有: year | week | day | hour | minute | second | micro | microsecond if a and b Is Same with Unit ? unit has: year | week | day | hour | minute | second | micro | microsecond

func (Datebin) IsSameYear

func (this Datebin) IsSameYear(date Datebin) bool

是否同一年 if a and b Is Same Year ?

func (Datebin) IsSameYearMonth

func (this Datebin) IsSameYearMonth(date Datebin) bool

是否是同一年的同一个月 if a and b Is Same Year and Month ?

func (Datebin) IsSameYearMonthDay

func (this Datebin) IsSameYearMonthDay(date Datebin) bool

是否是同一年的同一个月的同一天 if a and b Is Same Year, Month and Day ?

func (Datebin) IsSaturday

func (this Datebin) IsSaturday() bool

是否是周六 if the time is Saturday ?

func (Datebin) IsScorpioStar

func (this Datebin) IsScorpioStar() bool

天蝎座 if the time is Scorpio Star ?

func (Datebin) IsSeptember

func (this Datebin) IsSeptember() bool

是否是九月 if the time is September ?

func (Datebin) IsSpring

func (this Datebin) IsSpring() bool

是否是春季 if the time is Spring ?

func (Datebin) IsStartOfDay

func (this Datebin) IsStartOfDay() bool

是否当天开始 if the time is start of day ?

func (Datebin) IsStartOfDayWithMicrosecond

func (this Datebin) IsStartOfDayWithMicrosecond() bool

是否当天开始带微妙 if the time is start of day with microsecond ?

func (Datebin) IsSummer

func (this Datebin) IsSummer() bool

是否是夏季 if the time is Summer ?

func (Datebin) IsSunday

func (this Datebin) IsSunday() bool

是否是周日 if the time is Sunday ?

func (Datebin) IsTaurusStar

func (this Datebin) IsTaurusStar() bool

金牛座 if the time is Taurus Star ?

func (Datebin) IsThursday

func (this Datebin) IsThursday() bool

是否是周四 if the time is Thursday ?

func (Datebin) IsToday

func (this Datebin) IsToday() bool

是否是今天 if the time is Today ?

func (Datebin) IsTomorrow

func (this Datebin) IsTomorrow() bool

是否是明天 if the time is Tomorrow ?

func (Datebin) IsTuesday

func (this Datebin) IsTuesday() bool

是否是周二 if the time is Tuesday ?

func (Datebin) IsUTC added in v1.0.1009

func (this Datebin) IsUTC() bool

是否是 Utc 时区 if the time is Utc timezone ?

func (Datebin) IsVirgoStar

func (this Datebin) IsVirgoStar() bool

处女座 if the time is Virgo Star ?

func (Datebin) IsWednesday

func (this Datebin) IsWednesday() bool

是否是周三 if the time is Wednesday ?

func (Datebin) IsWeekday

func (this Datebin) IsWeekday() bool

是否是工作日 if the time is Weekday ?

func (Datebin) IsWeekend

func (this Datebin) IsWeekend() bool

是否是周末 if the time is Weekend ?

func (Datebin) IsWinter

func (this Datebin) IsWinter() bool

是否是冬季 if the time is Winter ?

func (Datebin) IsYesterday

func (this Datebin) IsYesterday() bool

是否是昨天 if the time is Yesterday ?

func (Datebin) IsZero

func (this Datebin) IsZero() bool

是否是零值时间 if the time is Zero time ?

func (Datebin) Layout

func (this Datebin) Layout(layout string, timezone ...string) string

使用布局字符输出时间格式 output datetime with layout

func (Datebin) Local added in v1.0.1021

func (this Datebin) Local() Datebin

设置 Local set Local timezone

func (Datebin) Lt

func (this Datebin) Lt(d Datebin) bool

判断判断 a 小于 d if a Lt d

func (Datebin) Lte

func (this Datebin) Lte(d Datebin) bool

判断判断 a 小于等于 d if a Lte d

func (Datebin) MarshalBinary added in v1.0.1019

func (this Datebin) MarshalBinary() ([]byte, error)

MarshalBinary implements the encoding.BinaryMarshaler interface.

func (Datebin) MarshalJSON added in v1.0.1006

func (this Datebin) MarshalJSON() ([]byte, error)

转换为 json Marshal to JSON

func (Datebin) Max

func (this Datebin) Max(d Datebin) Datebin

最大值 get a Maximum time from a and b

func (Datebin) Maximum

func (this Datebin) Maximum(d Datebin) Datebin

最大值 get a Maximum time from a and b

func (Datebin) Microsecond

func (this Datebin) Microsecond() int

获取当前微秒数,范围[0, 999999] get Microsecond data, range [0, 999999]

func (Datebin) Millisecond

func (this Datebin) Millisecond() int

获取当前毫秒数,范围[0, 999] get Millisecond data, range [0, 999]

func (Datebin) Min

func (this Datebin) Min(d Datebin) Datebin

最小值 get a Minimum time from a and b

func (Datebin) Minimum

func (this Datebin) Minimum(d Datebin) Datebin

最小值 get a Minimum time from a and b

func (Datebin) Minute

func (this Datebin) Minute() int

获取当前分钟数 get Minute data

func (Datebin) MinuteEnd

func (this Datebin) MinuteEnd() Datebin

分钟结束时间 get the Minute end

func (Datebin) MinuteStart

func (this Datebin) MinuteStart() Datebin

分钟开始时间 get the Minute start

func (Datebin) Month

func (this Datebin) Month() int

获取当前月 get Month data

func (Datebin) MonthEnd

func (this Datebin) MonthEnd() Datebin

本月结束时间 get the Month end

func (Datebin) MonthOfYear

func (this Datebin) MonthOfYear() int

获取本年的第几月 get Month Of Year

func (Datebin) MonthStart

func (this Datebin) MonthStart() Datebin

本月开始时间 get the Month start

func (Datebin) NYearEnd

func (this Datebin) NYearEnd(year int) Datebin

当前n年结束 get n years end

func (Datebin) NYearStart

func (this Datebin) NYearStart(year int) Datebin

当前n年开始 get n years start

func (Datebin) Nanosecond

func (this Datebin) Nanosecond() int

获取当前纳秒数,范围[0, 999999999] get Nanosecond data, range [0, 999999999]

func (Datebin) Ne

func (this Datebin) Ne(d Datebin) bool

判断判断 a 不等于 d if a Ne d

func (Datebin) Now

func (this Datebin) Now(timezone ...string) Datebin

当前 get Now time

func (Datebin) Offset

func (this Datebin) Offset(field string, offset int, timezone ...string) Datebin

间隔添加或者减少 add or sub time

func (Datebin) OffsetMonthsNoOverflow

func (this Datebin) OffsetMonthsNoOverflow(months int) Datebin

不溢出增加/减少 n 月 add or sub Month NoOverflow

func (Datebin) OffsetYearsNoOverflow

func (this Datebin) OffsetYearsNoOverflow(years int) Datebin

不溢出增加/减少 n 年 add or sub year NoOverflow

func (Datebin) OnError added in v1.0.1006

func (this Datebin) OnError(fn ErrorFunc) Datebin

错误信息 on Error with Error Func

func (Datebin) Parse

func (this Datebin) Parse(date string, timezone ...string) Datebin

解析时间字符 Parse date string

func (Datebin) ParseWithFormat added in v1.0.1002

func (this Datebin) ParseWithFormat(date string, format string, timezone ...string) Datebin

用格式化字符解析时间字符 Parse date string with format

func (Datebin) ParseWithLayout added in v1.0.1002

func (this Datebin) ParseWithLayout(date string, layout string, timezone ...string) Datebin

用布局字符解析时间字符 Parse date string with layout

func (Datebin) Quarter

func (this Datebin) Quarter() (quarter int)

获取当前季度 get Quarter data

func (Datebin) Round

func (this Datebin) Round(d time.Duration) Datebin

用于查找将规定的持续时间 'd' 舍入为 'm' 持续时间的最接近倍数的结果 Round returns the result of rounding t to the nearest multiple of d (since the zero time). The rounding behavior for halfway values is to round up. If d <= 0, Round returns t stripped of any monotonic clock reading but otherwise unchanged.

Round operates on the time as an absolute duration since the zero time; it does not operate on the presentation form of the time. Thus, Round(Hour) may return a time with a non-zero minute, depending on the time's Location.

func (*Datebin) Scan

func (this *Datebin) Scan(value any) error

实现 sql.Scanner 接口,Scan 将 value 填充进结构体 sql.Scanner interface

func (Datebin) SeasonEnd

func (this Datebin) SeasonEnd() Datebin

本季节结束时间 get the Season end

func (Datebin) SeasonStart

func (this Datebin) SeasonStart() Datebin

本季节开始时间 get the Season start

func (Datebin) Second

func (this Datebin) Second() int

获取当前秒数 get Second data

func (Datebin) SecondEnd

func (this Datebin) SecondEnd() Datebin

秒结束时间 get the Second end

func (Datebin) SecondStart

func (this Datebin) SecondStart() Datebin

秒开始时间 get the Second start

func (Datebin) SetDate added in v1.0.1002

func (this Datebin) SetDate(year, month, day int) Datebin

日期 Set Date

func (Datebin) SetDatetime added in v1.0.1002

func (this Datebin) SetDatetime(year, month, day, hour, minute, second int) Datebin

日期时间 Set Datetime

func (Datebin) SetDatetimeWithMicrosecond added in v1.0.1002

func (this Datebin) SetDatetimeWithMicrosecond(year, month, day, hour, minute, second, microsecond int) Datebin

日期时间带微秒 Set Datetime With Microsecond

func (Datebin) SetDatetimeWithMillisecond added in v1.0.1002

func (this Datebin) SetDatetimeWithMillisecond(year, month, day, hour, minute, second, millisecond int) Datebin

日期时间带毫秒 Set Datetime With Millisecond

func (Datebin) SetDatetimeWithNanosecond added in v1.0.1002

func (this Datebin) SetDatetimeWithNanosecond(year, month, day, hour, minute, second, nanosecond int) Datebin

日期时间带纳秒 Set Datetime With Nanosecond

func (Datebin) SetDay

func (this Datebin) SetDay(day int) Datebin

设置天 Set Day

func (Datebin) SetHour

func (this Datebin) SetHour(hour int) Datebin

设置小时 Set Hour

func (Datebin) SetMicrosecond

func (this Datebin) SetMicrosecond(microsecond int) Datebin

设置微秒 Set Microsecond

func (Datebin) SetMillisecond

func (this Datebin) SetMillisecond(millisecond int) Datebin

设置毫秒 Set Millisecond

func (Datebin) SetMinute

func (this Datebin) SetMinute(minute int) Datebin

设置分钟 Set Minute

func (Datebin) SetMonth

func (this Datebin) SetMonth(month int) Datebin

设置月份 Set Month

func (Datebin) SetNanosecond

func (this Datebin) SetNanosecond(nanosecond int) Datebin

设置纳秒 Set Nanosecond

func (Datebin) SetSecond

func (this Datebin) SetSecond(second int) Datebin

设置秒数 Set Second

func (Datebin) SetTime added in v1.0.1002

func (this Datebin) SetTime(hour, minute, second int) Datebin

时间 Set Time

func (Datebin) SetTimezone added in v1.0.1008

func (this Datebin) SetTimezone(timezone string) Datebin

设置时区 Set Timezone

func (Datebin) SetWeekStartsAt added in v1.0.1002

func (this Datebin) SetWeekStartsAt(day string) Datebin

设置一周的开始日期 set WeekStartsAt

func (Datebin) SetYear

func (this Datebin) SetYear(year int) Datebin

设置年份 Set Year

func (Datebin) StartAndEndOfWeeksOfMonth added in v1.0.1021

func (this Datebin) StartAndEndOfWeeksOfMonth() []weekRange

获取给定月份每周的开始日和结束日 get month all weeks

func (Datebin) String

func (this Datebin) String() string

默认返回 output string

func (Datebin) SubCenturies

func (this Datebin) SubCenturies(n uint) Datebin

前 n 百年 sub n Centuries

func (Datebin) SubCenturiesNoOverflow

func (this Datebin) SubCenturiesNoOverflow(n uint) Datebin

前 n 百年 sub n Centuries noOverflow

func (Datebin) SubCentury

func (this Datebin) SubCentury() Datebin

前一百年 sub one Century

func (Datebin) SubCenturyNoOverflow

func (this Datebin) SubCenturyNoOverflow() Datebin

前一百年 sub one noOverflow

func (Datebin) SubDay

func (this Datebin) SubDay() Datebin

前一天 Sub one Day

func (Datebin) SubDays

func (this Datebin) SubDays(n uint) Datebin

前 n 天 Sub n Days

func (Datebin) SubDecade

func (this Datebin) SubDecade() Datebin

前十年 Sub one Decade

func (Datebin) SubDecadeNoOverflow

func (this Datebin) SubDecadeNoOverflow() Datebin

前十年 Sub one Decade noOverflow

func (Datebin) SubDecades

func (this Datebin) SubDecades(n uint) Datebin

前 n 十年 Sub n Decades

func (Datebin) SubDecadesNoOverflow

func (this Datebin) SubDecadesNoOverflow(n uint) Datebin

前 n 十年 Sub n Decades noOverflow

func (Datebin) SubDuration

func (this Datebin) SubDuration(duration string) Datebin

按照持续时长字符串减少时间 sub Duration time

func (Datebin) SubHour

func (this Datebin) SubHour() Datebin

前一小时 Sub one Hour

func (Datebin) SubHours

func (this Datebin) SubHours(n uint) Datebin

前 n 小时 Sub n Hours

func (Datebin) SubMicrosecond

func (this Datebin) SubMicrosecond() Datebin

前一微妙 Sub one Microsecond

func (Datebin) SubMicroseconds

func (this Datebin) SubMicroseconds(n uint) Datebin

前 n 微妙 Sub n Microseconds

func (Datebin) SubMillisecond

func (this Datebin) SubMillisecond() Datebin

前一毫秒 Sub one Millisecond

func (Datebin) SubMilliseconds

func (this Datebin) SubMilliseconds(n uint) Datebin

前 n 毫秒 Sub n Milliseconds

func (Datebin) SubMinute

func (this Datebin) SubMinute() Datebin

前一分钟 Sub one Minute

func (Datebin) SubMinutes

func (this Datebin) SubMinutes(n uint) Datebin

前 n 分钟 Sub n Minutes

func (Datebin) SubMonth

func (this Datebin) SubMonth() Datebin

前一月 Sub one Month

func (Datebin) SubMonthNoOverflow

func (this Datebin) SubMonthNoOverflow() Datebin

前一月 Sub one Month NoOverflow

func (Datebin) SubMonths

func (this Datebin) SubMonths(n uint) Datebin

前 n 月 Sub n Months

func (Datebin) SubMonthsNoOverflow

func (this Datebin) SubMonthsNoOverflow(n uint) Datebin

前 n 月 Sub n Months NoOverflow

func (Datebin) SubNanosecond

func (this Datebin) SubNanosecond() Datebin

前一纳秒 Sub one Nanosecond

func (Datebin) SubNanoseconds

func (this Datebin) SubNanoseconds(n uint) Datebin

前 n 纳秒 Sub n Nanoseconds

func (Datebin) SubQuarter

func (this Datebin) SubQuarter() Datebin

前一季度 Sub one Quarter

func (Datebin) SubQuarterNoOverflow

func (this Datebin) SubQuarterNoOverflow() Datebin

前一季度 Sub one Quarter NoOverflow

func (Datebin) SubQuarters

func (this Datebin) SubQuarters(n uint) Datebin

前 n 季度 Sub n Quarters

func (Datebin) SubQuartersNoOverflow

func (this Datebin) SubQuartersNoOverflow(n uint) Datebin

前 n 季度 Sub n Quarters NoOverflow

func (Datebin) SubSecond

func (this Datebin) SubSecond() Datebin

前一秒 Sub one Second

func (Datebin) SubSeconds

func (this Datebin) SubSeconds(n uint) Datebin

前 n 秒 Sub n Seconds

func (Datebin) SubWeekday

func (this Datebin) SubWeekday() Datebin

前一周 Sub one Weekday

func (Datebin) SubWeekdays

func (this Datebin) SubWeekdays(n uint) Datebin

前 n 周 Sub n Weekdays

func (Datebin) SubYear

func (this Datebin) SubYear() Datebin

前一年 Sub one Year

func (Datebin) SubYearNoOverflow

func (this Datebin) SubYearNoOverflow() Datebin

前一年 Sub one Year NoOverflow

func (Datebin) SubYears

func (this Datebin) SubYears(n uint) Datebin

前 n 年 Sub n Years

func (Datebin) SubYearsNoOverflow

func (this Datebin) SubYearsNoOverflow(n uint) Datebin

前 n 年 Sub n Years NoOverflow

func (Datebin) Time

func (this Datebin) Time() (hour, minute, second int)

返回时分秒数据 get hour, minute, second data

func (Datebin) Timestamp

func (this Datebin) Timestamp() int64

秒级时间戳,10位 get Timestamp data, 10 length

func (Datebin) TimestampWithMicrosecond

func (this Datebin) TimestampWithMicrosecond() int64

微秒级时间戳,16位 get Timestamp With Microsecond data, 16 length

func (Datebin) TimestampWithMillisecond

func (this Datebin) TimestampWithMillisecond() int64

毫秒级时间戳,13位 get Timestamp With Millisecond data, 13 length

func (Datebin) TimestampWithNanosecond

func (this Datebin) TimestampWithNanosecond() int64

纳秒级时间戳,19位 get Timestamp With Nanosecond data, 19 length

func (Datebin) TimestampWithSecond

func (this Datebin) TimestampWithSecond() int64

秒级时间戳,10位 get Timestamp data, 10 length

func (Datebin) ToAnsicString

func (this Datebin) ToAnsicString(timezone ...string) string

输出 Ansic 格式字符串 output datetime with Ansic layout

func (Datebin) ToAtomString

func (this Datebin) ToAtomString(timezone ...string) string

输出 ATOM 格式字符串 output datetime with ATOM layout

func (Datebin) ToCookieString

func (this Datebin) ToCookieString(timezone ...string) string

输出 Cookie 格式字符串 output datetime with Cookie layout

func (Datebin) ToDateString

func (this Datebin) ToDateString(timezone ...string) string

输出日期 Date 格式字符串 output datetime with Date layout

func (Datebin) ToDatetimeMicroString added in v1.0.1023

func (this Datebin) ToDatetimeMicroString(timezone ...string) string

输出 DatetimeMicro 格式字符串 output datetime with DatetimeMicro layout

func (Datebin) ToDatetimeMilliString added in v1.0.1023

func (this Datebin) ToDatetimeMilliString(timezone ...string) string

输出 DatetimeMilli 格式字符串 output datetime with DatetimeMilli layout

func (Datebin) ToDatetimeNanoString added in v1.0.1023

func (this Datebin) ToDatetimeNanoString(timezone ...string) string

输出 DatetimeNano 格式字符串 output datetime with DatetimeNano layout

func (Datebin) ToDatetimeString

func (this Datebin) ToDatetimeString(timezone ...string) string

输出 Datetime 格式字符串 output datetime with Datetime layout

func (Datebin) ToDayDateTimeString

func (this Datebin) ToDayDateTimeString(timezone ...string) string

输出 DayDateTime 格式字符串 output datetime with DayDateTime layout

func (Datebin) ToFormatString

func (this Datebin) ToFormatString(layout string, timezone ...string) string

输出格式化字符的时间字符串 output datetime with sign

func (Datebin) ToFormattedDateString

func (this Datebin) ToFormattedDateString(timezone ...string) string

输出 FormattedDate 格式字符串 output datetime with FormattedDate layout

func (Datebin) ToFormattedDayDateString added in v1.0.1023

func (this Datebin) ToFormattedDayDateString(timezone ...string) string

输出 FormattedDayDate 格式字符串 output datetime with FormattedDayDate layout

func (Datebin) ToHourMinuteString added in v1.0.1023

func (this Datebin) ToHourMinuteString(timezone ...string) string

输出时间 HourMinute 格式字符串 output datetime with HourMinute layout

func (Datebin) ToHourString added in v1.0.1023

func (this Datebin) ToHourString(timezone ...string) string

输出时间 Hour 格式字符串 output datetime with Hour layout

func (Datebin) ToISO8601MicroString added in v1.0.1023

func (this Datebin) ToISO8601MicroString(timezone ...string) string

输出 ISO8601Micro 格式字符串 output datetime with ISO8601Micro layout

func (Datebin) ToISO8601MilliString added in v1.0.1023

func (this Datebin) ToISO8601MilliString(timezone ...string) string

输出 ISO8601Milli 格式字符串 output datetime with ISO8601Milli layout

func (Datebin) ToISO8601NanoString added in v1.0.1023

func (this Datebin) ToISO8601NanoString(timezone ...string) string

输出 ISO8601Nano 格式字符串 output datetime with ISO8601Nano layout

func (Datebin) ToISO8601String

func (this Datebin) ToISO8601String(timezone ...string) string

输出 ISO8601 格式字符串 output datetime with ISO8601 layout

func (Datebin) ToISO8601ZuluMicroString added in v1.0.1023

func (this Datebin) ToISO8601ZuluMicroString(timezone ...string) string

输出 ISO8601ZuluMicro 格式字符串 output datetime with ISO8601ZuluMicro layout

func (Datebin) ToISO8601ZuluMilliString added in v1.0.1023

func (this Datebin) ToISO8601ZuluMilliString(timezone ...string) string

输出 ISO8601ZuluMilli 格式字符串 output datetime with ISO8601ZuluMilli layout

func (Datebin) ToISO8601ZuluNanoString added in v1.0.1023

func (this Datebin) ToISO8601ZuluNanoString(timezone ...string) string

输出 ISO8601ZuluNano 格式字符串 output datetime with ISO8601ZuluNano layout

func (Datebin) ToISO8601ZuluString added in v1.0.1023

func (this Datebin) ToISO8601ZuluString(timezone ...string) string

输出 ISO8601Zulu 格式字符串 output datetime with ISO8601Zulu layout

func (Datebin) ToKitchenString

func (this Datebin) ToKitchenString(timezone ...string) string

输出 Kitchen 格式字符串 output datetime with Kitchen layout

func (Datebin) ToLayoutString

func (this Datebin) ToLayoutString(layout string, timezone ...string) string

使用布局字符输出时间格式 output datetime with layout

func (Datebin) ToRFC1036String

func (this Datebin) ToRFC1036String(timezone ...string) string

输出 RFC1036 格式字符串 output datetime with RFC1036 layout

func (Datebin) ToRFC1123String

func (this Datebin) ToRFC1123String(timezone ...string) string

输出 RFC1123 格式字符串 output datetime with RFC1123 layout

func (Datebin) ToRFC1123ZString

func (this Datebin) ToRFC1123ZString(timezone ...string) string

输出 RFC1123Z 格式字符串 output datetime with RFC1123Z layout

func (Datebin) ToRFC2822String

func (this Datebin) ToRFC2822String(timezone ...string) string

输出 RFC2822 格式字符串 output datetime with RFC2822 layout

func (Datebin) ToRFC3339MicroString added in v1.0.1023

func (this Datebin) ToRFC3339MicroString(timezone ...string) string

输出 RFC3339Milli 格式字符串 output datetime with RFC3339Milli layout

func (Datebin) ToRFC3339MilliString added in v1.0.1023

func (this Datebin) ToRFC3339MilliString(timezone ...string) string

输出 RFC3339Milli 格式字符串 output datetime with RFC3339Milli layout

func (Datebin) ToRFC3339NanoString added in v1.0.1023

func (this Datebin) ToRFC3339NanoString(timezone ...string) string

输出 RFC3339Nano 格式字符串 output datetime with RFC3339Nano layout

func (Datebin) ToRFC3339String

func (this Datebin) ToRFC3339String(timezone ...string) string

输出 RFC3339 格式字符串 output datetime with RFC3339 layout

func (Datebin) ToRFC7231String

func (this Datebin) ToRFC7231String(timezone ...string) string

输出 RFC7231 格式字符串 output datetime with RFC7231 layout

func (Datebin) ToRFC822String

func (this Datebin) ToRFC822String(timezone ...string) string

输出 RFC822 格式字符串 output datetime with RFC822 layout

func (Datebin) ToRFC822ZString

func (this Datebin) ToRFC822ZString(timezone ...string) string

输出 RFC822Z 格式字符串 output datetime with RFC822Z layout

func (Datebin) ToRFC850String

func (this Datebin) ToRFC850String(timezone ...string) string

输出 RFC850 格式字符串 output datetime with RFC850 layout

func (Datebin) ToRssString

func (this Datebin) ToRssString(timezone ...string) string

输出 Rss 格式字符串 output datetime with Rss layout

func (Datebin) ToRubyDateString

func (this Datebin) ToRubyDateString(timezone ...string) string

输出 RubyDate 格式字符串 output datetime with RubyDate layout

func (Datebin) ToSeasonString

func (this Datebin) ToSeasonString(timezone ...string) string

返回当前季节,以气象划分 output Season name

func (Datebin) ToShortDateString

func (this Datebin) ToShortDateString(timezone ...string) string

输出 ShortDate 格式字符串 output datetime with ShortDate layout

func (Datebin) ToShortDatetimeMicroString added in v1.0.1023

func (this Datebin) ToShortDatetimeMicroString(timezone ...string) string

输出 ShortDatetimeMicro 格式字符串 output datetime with ShortDatetimeMicro layout

func (Datebin) ToShortDatetimeMilliString added in v1.0.1023

func (this Datebin) ToShortDatetimeMilliString(timezone ...string) string

输出 ShortDatetimeMilli 格式字符串 output datetime with ShortDatetimeMilli layout

func (Datebin) ToShortDatetimeNanoString added in v1.0.1023

func (this Datebin) ToShortDatetimeNanoString(timezone ...string) string

输出 ShortDatetimeNano 格式字符串 output datetime with ShortDatetimeNano layout

func (Datebin) ToShortDatetimeString

func (this Datebin) ToShortDatetimeString(timezone ...string) string

输出 ShortDatetime 格式字符串 output datetime with ShortDatetime layout

func (Datebin) ToShortHourMinuteString added in v1.0.1023

func (this Datebin) ToShortHourMinuteString(timezone ...string) string

输出 ShortHourMinute 格式字符串 output datetime with ShortHourMinute layout

func (Datebin) ToShortTimeString

func (this Datebin) ToShortTimeString(timezone ...string) string

输出 ShortTime 格式字符串 output datetime with ShortTime layout

func (Datebin) ToStampMicroString added in v1.0.1023

func (this Datebin) ToStampMicroString(timezone ...string) string

输出 StampMicro 格式字符串 output datetime with StampMicro layout

func (Datebin) ToStampMilliString added in v1.0.1023

func (this Datebin) ToStampMilliString(timezone ...string) string

输出 StampMilli 格式字符串 output datetime with StampMilli layout

func (Datebin) ToStampNanoString added in v1.0.1023

func (this Datebin) ToStampNanoString(timezone ...string) string

输出 StampNano 格式字符串 output datetime with StampNano layout

func (Datebin) ToStampString added in v1.0.1023

func (this Datebin) ToStampString(timezone ...string) string

输出 Stamp 格式字符串 output datetime with Stamp layout

func (Datebin) ToStarString

func (this Datebin) ToStarString(timezone ...string) string

返回星座名称 output Star name

func (Datebin) ToStdTime added in v1.0.1021

func (this Datebin) ToStdTime(timezone ...string) time.Time

输出标准时间 output std time

func (Datebin) ToString

func (this Datebin) ToString(timezone ...string) string

返回字符 output string

func (Datebin) ToTimeString

func (this Datebin) ToTimeString(timezone ...string) string

输出时间 Time 格式字符串 output datetime with Time layout

func (Datebin) ToUnixDateString

func (this Datebin) ToUnixDateString(timezone ...string) string

输出 UnixDate 格式字符串 output datetime with UnixDate layout

func (Datebin) ToW3CString added in v1.0.1002

func (this Datebin) ToW3CString(timezone ...string) string

输出 W3C 格式字符串 output datetime with W3C layout

func (Datebin) ToWeekdayString

func (this Datebin) ToWeekdayString(timezone ...string) string

周几 output Weekday name

func (Datebin) Today

func (this Datebin) Today(timezone ...string) Datebin

今天 get Today time

func (Datebin) Tomorrow

func (this Datebin) Tomorrow(timezone ...string) Datebin

明天 get Tomorrow time

func (Datebin) Truncate

func (this Datebin) Truncate(d time.Duration) Datebin

用于查找将规定的持续时间 'd' 朝零舍入到 'm' 持续时间的倍数的结果 Truncate returns the result of rounding d toward zero to a multiple of m. If m <= 0, Truncate returns d unchanged.

func (Datebin) UTC added in v1.0.1021

func (this Datebin) UTC() Datebin

设置 UTC set UTC timezone

func (*Datebin) UnmarshalBinary added in v1.0.1019

func (this *Datebin) UnmarshalBinary(data []byte) error

UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.

func (*Datebin) UnmarshalJSON added in v1.0.1006

func (this *Datebin) UnmarshalJSON(val []byte) error

解析 json Unmarshal JSON data

func (Datebin) Value

func (this Datebin) Value() (driver.Value, error)

实现 driver.Valuer 接口,Value 返回数据 driver.Valuer interface

func (Datebin) WeekEnd

func (this Datebin) WeekEnd() Datebin

本周结束 get the Week end

func (Datebin) WeekOfYear

func (this Datebin) WeekOfYear() int

获取本年的第几周 get Week Of Year

func (Datebin) WeekStart

func (this Datebin) WeekStart() Datebin

本周开始 get the Week start

func (Datebin) Weekday

func (this Datebin) Weekday() int

获取星期几数字 get Weekday data

func (Datebin) WithErrors added in v1.0.1019

func (this Datebin) WithErrors(errs []error) Datebin

覆盖错误信息 set Errors

func (Datebin) WithLocation

func (this Datebin) WithLocation(loc *time.Location) Datebin

设置时区 set Location struct

func (Datebin) WithTime

func (this Datebin) WithTime(time time.Time) Datebin

设置时间 set Time

func (Datebin) WithWeekStartAt

func (this Datebin) WithWeekStartAt(weekday time.Weekday) Datebin

设置周开始时间 set Start Week

func (Datebin) Year

func (this Datebin) Year() int

获取当前年 get Year data

func (Datebin) YearEnd

func (this Datebin) YearEnd() Datebin

本年结束 get the Year end

func (Datebin) YearStart

func (this Datebin) YearStart() Datebin

本年开始 get the Year start

func (Datebin) Yesterday

func (this Datebin) Yesterday(timezone ...string) Datebin

昨天 get Yesterday time

type DiffTime added in v1.0.1008

type DiffTime struct {
	// 开始时间 / start time
	Start Datebin

	// 结束时间 / end time
	End Datebin
}

*

  • 时间间隔 / diff time *
  • @create 2022-3-9
  • @author deatil

func NewDiffTime added in v1.0.1008

func NewDiffTime(start Datebin, end Datebin) DiffTime

构造函数 new DiffTime

func (DiffTime) Days added in v1.0.1008

func (this DiffTime) Days() int64

获取相差天 get diff Days

func (DiffTime) DaysAbs added in v1.0.1008

func (this DiffTime) DaysAbs() int64

获取相差天,绝对值 get diff abs Days

func (DiffTime) DurationBetween added in v1.0.1021

func (this DiffTime) DurationBetween() time.Duration

计算两个日期之间的持续时间 get Duration data

func (DiffTime) DurationBetweenAbs added in v1.0.1023

func (this DiffTime) DurationBetweenAbs() time.Duration

计算两个日期之间的持续时间,绝对值 get abs Duration data

func (DiffTime) DurationBetweens added in v1.0.1021

func (this DiffTime) DurationBetweens() (days, hours, minutes, seconds int)

返回持续时间为人类可读的数据 return Duration datas

func (DiffTime) DurationBetweensAbs added in v1.0.1021

func (this DiffTime) DurationBetweensAbs() (days, hours, minutes, seconds int)

返回持续时间为人类可读的数据,绝对值 return abs Duration datas

func (DiffTime) Format added in v1.0.1008

func (this DiffTime) Format(str string) string

格式化输出 output format data

func (DiffTime) Formatter added in v1.0.1021

func (this DiffTime) Formatter() Formatter

获取格式化 get diff Formatter

func (DiffTime) GetEnd added in v1.0.1008

func (this DiffTime) GetEnd() Datebin

获取结束时间 get end time

func (DiffTime) GetStart added in v1.0.1008

func (this DiffTime) GetStart() Datebin

获取开始时间 get start time

func (DiffTime) Hours added in v1.0.1008

func (this DiffTime) Hours() int64

获取相差小时 get diff Hours

func (DiffTime) HoursAbs added in v1.0.1008

func (this DiffTime) HoursAbs() int64

获取相差小时,绝对值 get diff abs Hours

func (DiffTime) Minutes added in v1.0.1008

func (this DiffTime) Minutes() int64

获取相差分钟 get diff Minutes

func (DiffTime) MinutesAbs added in v1.0.1008

func (this DiffTime) MinutesAbs() int64

获取相差分钟,绝对值 get diff abs Minutes

func (DiffTime) Months added in v1.0.1008

func (this DiffTime) Months() int64

获取相差月份 get diff Months

func (DiffTime) MonthsAbs added in v1.0.1008

func (this DiffTime) MonthsAbs() int64

获取相差月份,绝对值 get diff abs Months

func (DiffTime) Seconds added in v1.0.1008

func (this DiffTime) Seconds() int64

获取相差秒 get diff Seconds

func (DiffTime) SecondsAbs added in v1.0.1008

func (this DiffTime) SecondsAbs() int64

获取相差秒,绝对值 get diff abs Seconds

func (DiffTime) SetEnd added in v1.0.1008

func (this DiffTime) SetEnd(end Datebin) DiffTime

设置结束时间 set end time

func (DiffTime) SetStart added in v1.0.1008

func (this DiffTime) SetStart(start Datebin) DiffTime

设置开始时间 set start time

func (DiffTime) Weeks added in v1.0.1008

func (this DiffTime) Weeks() int64

获取相差周 get diff Weeks

func (DiffTime) WeeksAbs added in v1.0.1008

func (this DiffTime) WeeksAbs() int64

获取相差周,绝对值 get diff abs Weeks

func (DiffTime) Years added in v1.0.1008

func (this DiffTime) Years() int64

获取相差年 get diff Years

func (DiffTime) YearsAbs added in v1.0.1008

func (this DiffTime) YearsAbs() int64

获取相差年,绝对值 get diff abs Years

type ErrorFunc added in v1.0.1006

type ErrorFunc = func([]error)

错误方法 Error Func

type Formatter added in v1.0.1011

type Formatter struct {
	// contains filtered or unexported fields
}

*

  • 格式化时间 / Formatter time *
  • @create 2022-12-11
  • @author deatil

func NewFormatter added in v1.0.1011

func NewFormatter() Formatter

构造函数 New Formatter

func (Formatter) Day added in v1.0.1011

func (this Formatter) Day() int

获取天 get Day

func (Formatter) FromDay added in v1.0.1011

func (this Formatter) FromDay(data int64) Formatter

传入天 set Day

func (Formatter) FromHour added in v1.0.1011

func (this Formatter) FromHour(data int64) Formatter

传入小时 set Hour

func (Formatter) FromMicrosecond added in v1.0.1011

func (this Formatter) FromMicrosecond(data int64) Formatter

传入微秒 set Microsecond

func (Formatter) FromMillisecond added in v1.0.1011

func (this Formatter) FromMillisecond(data int64) Formatter

传入毫秒 set Millisecond

func (Formatter) FromMinute added in v1.0.1011

func (this Formatter) FromMinute(data int64) Formatter

传入分钟 set Minute

func (Formatter) FromNanosecond added in v1.0.1011

func (this Formatter) FromNanosecond(data int64) Formatter

传入纳秒 set Nanosecond

func (Formatter) FromSecond added in v1.0.1011

func (this Formatter) FromSecond(data int64) Formatter

传入秒 set Second

func (Formatter) FromWeek added in v1.0.1011

func (this Formatter) FromWeek(data int64) Formatter

传入周 set Week

func (Formatter) GetTime added in v1.0.1011

func (this Formatter) GetTime() int64

获取时间 Get Time

func (Formatter) Hour added in v1.0.1011

func (this Formatter) Hour() int

获取小时 get Hour

func (Formatter) Microsecond added in v1.0.1011

func (this Formatter) Microsecond() int

获取微秒 get Microsecond

func (Formatter) Millisecond added in v1.0.1011

func (this Formatter) Millisecond() int

获取毫秒 get Millisecond

func (Formatter) Minute added in v1.0.1011

func (this Formatter) Minute() int

获取分钟 get Minute

func (Formatter) Nanosecond added in v1.0.1011

func (this Formatter) Nanosecond() int

获取纳秒 get Nanosecond

func (Formatter) Second added in v1.0.1011

func (this Formatter) Second() int

获取秒 get Second

func (Formatter) WeekAndDay added in v1.0.1011

func (this Formatter) WeekAndDay() (int, int)

获取周数和天数 get Week And Day

func (Formatter) WithTime added in v1.0.1011

func (this Formatter) WithTime(data int64) Formatter

设置时间 set Time

type Timestamp

type Timestamp Datebin

时间戳 Timestamp struct

func (Timestamp) MarshalJSON added in v1.0.1006

func (this Timestamp) MarshalJSON() ([]byte, error)

转换为 json Marshal to JSON

func (*Timestamp) UnmarshalJSON added in v1.0.1006

func (this *Timestamp) UnmarshalJSON(val []byte) error

解析 json Unmarshal JSON data

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL