model

package
v0.0.0-...-0d2f177 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DATE_LAYOUT = "2006-01-02"

Functions

This section is empty.

Types

type Attendance

type Attendance struct {
	Name       string    // 姓名
	Department string    // 部门
	Date       time.Time // 日期
	Week       string    // 星期
	DateType   string    // 日期类型
	ClockIn    string    // 签到时间
	ClockOut   string    // 签退时间
	Duration   float64   // 工作时长
	Late       int       // 迟到时间(分钟)
	LeaveEarly int       // 早退时间(分钟)
	Absent     int       // 旷工时间(小时)
}

考勤信息

func (*Attendance) EqualTo

func (a *Attendance) EqualTo(e *Attendance) bool

type Date

type Date struct {
	Year  int
	Month int
	Day   int
}

func (Date) EqualTo

func (d Date) EqualTo(e Date) bool

判断两个日期是否相等

func (*Date) FromString

func (d *Date) FromString(dateStr string) error

FromString 从字符串解析日期 日期格式为: "2019-1-1"

func (Date) GreaterEqual

func (d Date) GreaterEqual(other Date) bool

func (Date) NextDay

func (d Date) NextDay() Date

func (*Date) ToString

func (d *Date) ToString() string

Jump to

Keyboard shortcuts

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