x: within.website/x/internal/mainsa Index | Files

package mainsa

import "within.website/x/internal/mainsa"

Package mainsa is a small set of conversion or other useful utility functions for converting plane 432 units to ma Insa units.


Package Files

date.go doc.go nanpa_string.go sike_string.go tawa_string.go


var (
    ErrBeforeEpoch = errors.New("mainsa: time before zero date")


var YearZero = time.Unix(zeroDateUnix, 0)

YearZero is the arbitrary anchor date from plane 432 to ma Insa year 1 planting season, coming cycle, first week, first day..

type Nanpa Uses

type Nanpa int

Nanpa is a generic toki pona number

const (
    Wan Nanpa = 1 + iota


func (Nanpa) String Uses

func (i Nanpa) String() string

type Sike Uses

type Sike int

Sike is a set of 3 threads, or a month.

const (
    Kama Sike = 1 + iota

The three sikes.

func (Sike) String Uses

func (i Sike) String() string

type Tawa Uses

type Tawa int

Tawa is a set of 3 cycles, or a season.

const (
    Kasi Tawa = 1 + iota

The four tawas of a year.

func (Tawa) String Uses

func (i Tawa) String() string

type TenpoNimi Uses

type TenpoNimi struct {
    Year      int   // suli
    Season    Tawa  // tawa
    Month     Sike  // sike
    Week      Nanpa // linja
    Day       Nanpa // suno
    Remainder time.Duration

TenpoNimi is the name of a given time. The remainder time is given as a time.Duration and should be shown in hour:minute format using time constant "3:04".

func At Uses

func At(t time.Time) (TenpoNimi, error)

At returns the time in ma Insa for a given Go time.

func (TenpoNimi) String Uses

func (tn TenpoNimi) String() string

Package mainsa imports 5 packages (graph) and is imported by 4 packages. Updated 2019-06-07. Refresh now. Tools for package owners.