타임카드 계산기
휴식 공제 및 초과 근무 계산을 포함한 주간 근무 시간을 기록합니다.
| 일 | 시작 | 종료 | 시간 | |
|---|---|---|---|---|
| 7.50h | ||||
| 7.50h | ||||
| 7.50h | ||||
| 7.50h | ||||
| 7.50h |
이 도구 소개
타임카드 계산기는 직원, 프리랜서, 노동 비용 모니터링 및 초과 근무 규제 준수가 필요한 관리자에게 주간 근무 시간을 추적하기 위한 필수 도구입니다. 수동 시간 추적과 달리 이 디지털 계산기는 휴식 시간 공제를 자동으로 고려하고 총 근무 시간, 정규 시간, 초과 근무를 즉시 계산하여 시간을 절약하고 산술 오류를 제거합니다. 팀의 주간 급여 관리, 클라이언트 청구용 청구 가능 시간 계산, 또는 개인 기록 유지 등 정확한 시간 기록은 공정한 보상과 업무 효율의 기초입니다.
이 도구를 사용하는 것은 간단합니다. 주의 각 날짜에 대해 출근 및 퇴근 시간을 입력하고 취한 무급 휴식을 지정하면 계산기가 즉시 총 시간, 일일 평균 시간, 초과 근무 시간을 표시합니다. 인터페이스는 종료 시간이 시작 시간보다 이른 경우를 감지하고 자동으로 계산을 조정하여 자정을 넘는 야간 근무와 같은 현실적인 시나리오를 처리합니다. 필요에 따라 날짜를 추가하거나 제거하고, 다양한 휴식 길이를 시도하며, 통계를 실시간으로 업데이트할 수 있습니다. 이는 근무 기록 감시, 일정 계획, 주간 초과 근무 누적 이해에 완벽합니다.
이 도구는 급여 관리자, 근무 감독자, 프리랜서, 초과 근무 규칙이나 시간 단위 클라이언트 청구 대상인 모든 사람에게 매우 유용합니다. 시간 계산에서 추측을 제거하고 주간 시간 기준 및 초과 근무율을 지정하는 노동법 준수를 보장하는 데 도움이 됩니다. 정규 시간과 초과 근무 시간 간의 즉각적인 시각적 피드백을 제공함으로써 근로자가 보상을 이해하고 고용주가 정확한 급여 기록을 검증하도록 도와줍니다.
자주 묻는 질문
코드 구현
from datetime import datetime, timedelta
def calculate_time_card(entries: list[dict]) -> dict:
"""Calculate total hours from clock-in/clock-out pairs.
Each entry: {"clock_in": "HH:MM", "clock_out": "HH:MM", "break_minutes": 0}
"""
total_seconds = 0
for entry in entries:
fmt = "%H:%M"
clock_in = datetime.strptime(entry["clock_in"], fmt)
clock_out = datetime.strptime(entry["clock_out"], fmt)
if clock_out < clock_in:
clock_out += timedelta(days=1) # overnight shift
duration = clock_out - clock_in
break_secs = entry.get("break_minutes", 0) * 60
total_seconds += max(0, duration.total_seconds() - break_secs)
hours = int(total_seconds // 3600)
minutes = int((total_seconds % 3600) // 60)
return {
"total_seconds": total_seconds,
"total_hours": total_seconds / 3600,
"formatted": f"{hours}h {minutes:02d}m",
}
# Example time card
entries = [
{"clock_in": "09:00", "clock_out": "12:30", "break_minutes": 0},
{"clock_in": "13:00", "clock_out": "17:30", "break_minutes": 15},
{"clock_in": "22:00", "clock_out": "06:00", "break_minutes": 30}, # overnight
]
result = calculate_time_card(entries)
print(f"Total: {result['formatted']} ({result['total_hours']:.2f} hours)")Comments & Feedback
Comments are powered by Giscus. Sign in with GitHub to leave a comment.