money

package
v0.0.0-...-110d06e Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package money 货币单位/换算

Index

Constants

View Source
const (
	F CNY = 1         // 分
	J     = 10 * F    // 角
	Y     = 10 * J    // 元
	W     = 10000 * Y // 万
	E     = 10000 * W // 亿
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CNY

type CNY int64

CNY 人民币(单位:分)

func New

func New(y, j, f CNY) CNY

New 构造人民币对象

y: 元
j: 角
f: 分

func (CNY) Printf

func (c CNY) Printf(format string) string

Printf todo 如:money.Printf("¥.2d",100) => ¥100.00

func (CNY) String

func (c CNY) String() string

Jump to

Keyboard shortcuts

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