1.0.5 • Published 1 year ago
qloverduration v1.0.5
Standard Readme
Table of Contents
- Install
- Usage
- Other
Install
This project uses node and npm. Go check them out if you don't have them locally installed.
npm install qloverduration
Usage
// 导入 calculateOvertime 计算加班时间的函数
// 该函数计算时间是加班时间,我们公司周一到周五的上班时间为早上八点半到中午十二点,下午两点到晚上的十八点半,六点半之后是加班时间。周六的上班时间为早上八点半到中午十二点。周六下午和周日算是加班时间。并且排除了节假日,算上了调休时间。
import { calculateOvertime } from "qloverduration";
// 使用
this.leaveDuration = leaveDurationMtoS(this.leaveStartTime, this.leaveEndTime);
Other
特别说明:需要配合 ElementUI
的 el-date-picker
组件使用,或者传入两个时间格式为 el-date-picker
的两个参数即可,加班时间只算当天的加班时间,并不支持跨天计算。