hyTags
HomeHome DocumentationDocumentation

date-time-difference

Calculates the difference between two date and time values in seconds.
Parameter
Type
Description
self
DateTime
The first date and time.
other
DateTime
The second date and time to subtract.
return
number
The difference in seconds between the two date and time values.
Test Case:Difference of one day
    <div></div>
    
    <date-time-new year="2024" month="6" day="15">
    <date-time-new year="2024" month="6" day="16">
    <date-time-difference>
    <assert-equal value="86400" type="number">
    
    👆 Try to change something!
  • Test succeeded Test failed