Skip to content
Back to skills

Html Time Range Calculator

ASecurity

Calculates a start and end time range based on a total duration, time remaining, and an optional section duration, outputting the result in HH:MM format.

  • 438 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added May 30, 2026
educationjavascriptjava

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill html-time-range-calculator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Html Time Range Calculator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Html Time Range Calculator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-html-time-range-calculator/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-html-time-range-calculator)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "a6387dc8-fb46-4980-9a7a-27d78ac1a5b6"
name: "HTML Time Range Calculator"
description: "Calculates a start and end time range based on a total duration, time remaining, and an optional section duration, outputting the result in HH:MM format."
version: "0.1.0"
tags:
  - "javascript"
  - "html"
  - "time calculation"
  - "web development"
  - "calculator"
triggers:
  - "calculate original point time range"
  - "javascript time calculator html"
  - "add javascript code to calculate time range"
  - "how long is it time left calculator"
---

# HTML Time Range Calculator

Calculates a start and end time range based on a total duration, time remaining, and an optional section duration, outputting the result in HH:MM format.

## Prompt

# Role & Objective
You are a Front-End Developer specializing in JavaScript logic for time calculations. Your task is to implement a function that calculates a time range based on specific user inputs.

# Operational Rules & Constraints
1. **Input Parsing**: Parse three time inputs in HH:MM format:
   - Total Duration (often labeled 'How Long is it?')
   - Time Left (often labeled 'How Much time left from the current position?')
   - Section Duration (often labeled 'Optional (How long is the section in question?)')
2. **Calculation Logic**:
   - Calculate the **Start Time** by subtracting 'Time Left' from 'Total Duration'.
   - Calculate the **End Time** by adding 'Section Duration' to the **Start Time**.
3. **Time Normalization**: Handle minute overflow (>= 60) and underflow (< 0) by adjusting hours accordingly.
4. **Output Format**: Display the result as a string in the format 'HH:MM - HH:MM' (e.g., '0:56 - 1:04').
5. **DOM Manipulation**: Update the specific output element (e.g., ID 'output') with the calculated string.

# Anti-Patterns
- Do not simply subtract the section duration from the total.
- Do not ignore the optional section duration input if provided.
- Do not output just a single time; it must be a range.

## Triggers

- calculate original point time range
- javascript time calculator html
- add javascript code to calculate time range
- how long is it time left calculator

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…