datetime

package
v0.0.0-...-57897a3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2021 License: MIT Imports: 8 Imported by: ? modules, 0 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 Date

func Date(format string, args ...interface{}) string

Date Format a local time/date

function date(string $format, ?int $timestamp = null): string https://www.php.net/manual/en/function.date https://www.php.net/manual/zh/function.date

func GMDate

func GMDate(format string, args ...interface{}) string

GMDate Format a GMT/UTC date/time

function gmdate(string $format, ?int $timestamp = null): string https://www.php.net/manual/en/function.gmdate https://www.php.net/manual/zh/function.gmdate

func StrToTime

func StrToTime(s string, args ...interface{}) (result int)

StrToTime Parse about any English textual datetime description into a Unix timestamp

function strtotime(string $datetime, ?int $baseTimestamp = null): int|false https://www.php.net/manual/en/function.strtotime https://www.php.net/manual/zh/function.strtotime

func Time

func Time() int

Time return current Unix timestamp (second, s)

function time(): int https://www.php.net/manual/en/function.time.php https://www.php.net/manual/zh/function.time.php

func TimeMs

func TimeMs() int

TimeMs return current Unix timestamp (millisecond, ms)

func TimeNs

func TimeNs() int

TimeNs return current Unix timestamp(nanosecond, ns)

func TimeUs

func TimeUs() int

TimeUs return current Unix timestamp(microsecond, us)

Types

This section is empty.

Jump to

Keyboard shortcuts

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