date

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Now

func Now() js.Number

Types

type Date

type Date struct {
	js.Value
}

Date is the JS Date type.

func FromString

func FromString(dateString js.AnyString) Date

FromString creates a JavaScript Date instance that represents a single moment in time in a platform-independent format. Date objects contain a Number that represents milliseconds since 1 January 1970 UTC.

func (Date) Day

func (d Date) Day() js.Number

Day returns the day of the month.

func (Date) MonthString

func (d Date) MonthString() js.String

MonthString returns the localised month string of the date, ie January, Febuary.

func (Date) TimeString

func (d Date) TimeString() js.String

TimeString returns the localised time-string of the date, ie 1:15:30 AM

Jump to

Keyboard shortcuts

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