carbon

package module
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const CARBON object.Type = "carbon.carbon"

Variables

This section is empty.

Functions

func Create

func Create(ctx context.Context, args ...object.Object) object.Object

func Module

func Module() *object.Module

func Now

func Now(ctx context.Context, args ...object.Object) object.Object

func Parse

func Parse(ctx context.Context, args ...object.Object) object.Object

func Tomorrow

func Tomorrow(ctx context.Context, args ...object.Object) object.Object

func Yesterday

func Yesterday(ctx context.Context, args ...object.Object) object.Object

Types

type Carbon

type Carbon struct {
	// contains filtered or unexported fields
}

func NewCarbon

func NewCarbon(v carbon.Carbon) *Carbon

func (*Carbon) Cost

func (c *Carbon) Cost() int

func (*Carbon) Equals

func (c *Carbon) Equals(other object.Object) object.Object

func (*Carbon) GetAttr

func (c *Carbon) GetAttr(name string) (object.Object, bool)

func (*Carbon) Inspect

func (c *Carbon) Inspect() string

func (*Carbon) Interface

func (c *Carbon) Interface() interface{}

func (*Carbon) IsTruthy

func (c *Carbon) IsTruthy() bool

func (*Carbon) RunOperation

func (c *Carbon) RunOperation(opType op.BinaryOpType, right object.Object) object.Object

func (*Carbon) SetAttr

func (c *Carbon) SetAttr(name string, value object.Object) error

func (*Carbon) String

func (c *Carbon) String() string

func (*Carbon) Type

func (c *Carbon) Type() object.Type

func (*Carbon) Value

func (c *Carbon) Value() carbon.Carbon

Jump to

Keyboard shortcuts

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