ztime

package
v1.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlareTimeFormatToGo

func FlareTimeFormatToGo(format string) (string, error)

FlareTimeFormatToGo converts a FlareTime format string to a Go format string.

Types

type Time

type Time struct {
	lang.Base
	// contains filtered or unexported fields
}

Time wraps the Go time.Time type

func NewTime

func NewTime(t time.Time) *Time

NewTime creates a new Time object

func (*Time) Copy

func (t *Time) Copy() lang.Object

Copy returns a copy of the object

func (*Time) Method

func (t *Time) Method(name string) lang.Method

Method returns the named method

func (*Time) Methods

func (t *Time) Methods() []string

Methods returns the available method names

func (*Time) SetVariable

func (t *Time) SetVariable(_ string, _ lang.Object) error

SetVariable sets a variable value

func (*Time) String

func (t *Time) String() string

String returns a string representation

func (*Time) Type

func (t *Time) Type() lang.ObjType

Type returns the object type

func (*Time) TypeString

func (t *Time) TypeString() string

func (*Time) Value

func (t *Time) Value() any

Value returns the underlying value

func (*Time) Variable

func (t *Time) Variable(variable string) lang.Object

Variable returns a variable by name

func (*Time) Variables

func (t *Time) Variables() []string

Variables returns the available variable names

type TimeNamespace

type TimeNamespace struct{}

TimeNamespace implements a namespace for time operations

func New

func New() *TimeNamespace

New creates a new time namespace

func (*TimeNamespace) Methods

func (*TimeNamespace) Methods() map[string]lang.Method

Methods returns the methods in the namespace

func (*TimeNamespace) Namespace

func (*TimeNamespace) Namespace() string

Namespace returns the name of the namespace

func (*TimeNamespace) Objects

func (*TimeNamespace) Objects() map[string]lang.Object

Objects returns the objects in the namespace

Jump to

Keyboard shortcuts

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