Html time range calculator
Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/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.From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill html-time-range-calculatorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
2.1 KB, 373 tokens by cl100k_base, as published. Nobody here has run it
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
- 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?)')
- 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.
- Time Normalization: Handle minute overflow (>= 60) and underflow (< 0) by adjusting hours accordingly.
- Output Format: Display the result as a string in the format 'HH:MM - HH:MM' (e.g., '0:56 - 1:04').
- 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
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.