timeutil

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByUnix

func ByUnix(u int64) time.Time

UnixTime(ミリ秒)からJSTのTimeを取得する

func DayPeriod

func DayPeriod(at int64, diff int) (int64, int64)

日の範囲(0:00:00〜23:59:59)を取得する

func DaysToMilliseconds

func DaysToMilliseconds(days int) int64

指定日数をミリ秒に変換する

func GetWeekJP added in v1.3.0

func GetWeekJP(t time.Time) string

曜日(日本語)を取得する

func HoursToMilliseconds

func HoursToMilliseconds(hours int) int64

指定時数をミリ秒に変換する

func IsToday

func IsToday(u int64) bool

本日か判定する

func LastDayByMonth

func LastDayByMonth(at int64) int

月の最終日を取得する

func MinutesToMilliseconds

func MinutesToMilliseconds(minutes int) int64

指定分数をミリ秒に変換する

func MonthPeriod

func MonthPeriod(at int64, diff int) (int64, int64)

月の範囲(1日0:00:00〜最終日23:59:59)を取得する

func Now

func Now() time.Time

現在時刻をJSTのTimeで取得する

func NowUnix

func NowUnix() int64

現在時刻をJSTのUnixTime(ミリ秒)で取得する

func SecondsToMilliseconds

func SecondsToMilliseconds(seconds int) int64

指定秒数をミリ秒に変換する

func UnixMilli added in v1.6.6

func UnixMilli(year int, month int, day int, hour int, minute int, second int) int64

指定日時をUnixTimeで取得する

func YearPeriod

func YearPeriod(at int64, diff int) (int64, int64)

年の範囲(12月1日0:00:00〜12月31日23:59:59)を取得する

func ZoneJST

func ZoneJST() *time.Location

日本のタイムゾーンを取得する

Types

This section is empty.

Jump to

Keyboard shortcuts

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