CalculatorsLesson 164Free preview
Time Converter
This lesson is part of Web Developer Tools · All levels
Summary
Time Converter converts units of time like seconds, minutes, hours, days, weeks, months, and years. Units to weeks have fixed values, whereas months and years depend on calendars so they are not always the same length. For accurate dates, use the date function, not the 30 day monthly assumption.
Key points
- The basic unit of time is the second.
- 1 minute is 60 seconds and 1 hour is 3600 seconds.
- One day is 86,400 seconds and one week is 604,800 seconds.
- Months 28-31 days and a leap year make calendar conversion unstable
- Duration differs from the calendar date
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.