time_month: Sum up the working hours of month i.

time_monthR Documentation

Sum up the working hours of month i.

Description

Sum up the working hours of month i.

Usage

time_month(
  timesheet,
  month = data.table::month(Sys.time()),
  year = data.table::year(Sys.time()),
  work_left = FALSE,
  hours_per_month = 39
)

Arguments

timesheet

A correctly named data.table.

month

Am integer between 1 and 12, defaults to current month.

year

Am integer, defaults to current year.

work_left

Calculate remaining hours instead.

hours_per_month

How many hours are worked per month.

Value

A string with time in hours.

Examples

timesheet <- add_entry("2021-11-04 12:30:00", "2021-11-04 13:30:00", "Eating in office hours")
timesheet <- add_entry("2021-12-04 13:30:00", "2021-12-04 16:30:00", "Powernap", timesheet)
time_month(timesheet, month = 11)
time_month(timesheet, month = 12)
time_month(timesheet, month = 12, work_left = TRUE)

max607/timesheet documentation built on July 22, 2024, 4:10 p.m.