dates

package
v0.0.0-...-736094d Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

* Copyright 2020-2021 the original author(https://github.com/wj596) * * <p> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * </p>

* Copyright 2020-2021 the original author(https://github.com/wj596) * * <p> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * </p>

Index

Constants

View Source
const (
	// 日期格式
	DayFormatter = "2006-01-02"
	// 日期时间格式--分
	DayTimeMinuteFormatter = "2006-01-02 15:04"
	// 日期时间格式--秒
	DayTimeSecondFormatter = "2006-01-02 15:04:05"
	// 日期时间格式--毫秒
	DayTimeMillisecondFormatter = "2006-01-02 15:04:05.sss"
	// 时间格式--秒
	TimeSecondFormatter = "15:04:05"
)
View Source
const (
	HHT = "03"
	HH  = "15"
	MM  = "01"
	SS  = "05"

	Z   = "MST"
	ZZZ = "MST"
)

Variables

This section is empty.

Functions

func ConvertGoFormat

func ConvertGoFormat(format string) string

func DefaultLayout

func DefaultLayout(time time.Time) string

func FromDefaultLayout

func FromDefaultLayout(str string) time.Time

func FutureDayDate

func FutureDayDate(futureDay int) time.Time

func Layout

func Layout(date time.Time, layout string) string

func MonthStartDayDate

func MonthStartDayDate() time.Time

func NowFormatted

func NowFormatted() string

默认格式2006-01-02 15:04:05

func NowLayout

func NowLayout(layout string) string

func NowMillisecond

func NowMillisecond() int64

当前的毫秒时间戳

func PastDayDate

func PastDayDate(pastDay int) time.Time

func WeekStartDayDate

func WeekStartDayDate() time.Time

Types

This section is empty.

Jump to

Keyboard shortcuts

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