timeutil

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: MIT Imports: 1 Imported by: 3 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByUnix

func ByUnix(u int64) time.Time

ByUnix ... Unixtimestamp(ミリ秒)からJSTのTimeを取得する

func DayPeriod

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

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

func DaysToMilliseconds

func DaysToMilliseconds(days int) int64

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

func HoursToMilliseconds

func HoursToMilliseconds(hours int) int64

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

func IsToday

func IsToday(u int64) bool

IsToday ... 本日か判定する

func LastDayByMonth

func LastDayByMonth(at int64) int

LastDayByMonth ... 月の最終日を取得する

func MinutesToMilliseconds

func MinutesToMilliseconds(minutes int) int64

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

func MonthPeriod

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

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

func Now

func Now() time.Time

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

func NowUnix

func NowUnix() int64

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

func SecondsToMilliseconds

func SecondsToMilliseconds(seconds int) int64

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

func ToUnix

func ToUnix(t time.Time) int64

ToUnix ... TimeからUnixtimestamp(ミリ秒)に変換する

func YearPeriod

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

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

func ZoneJST

func ZoneJST() *time.Location

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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