hyTags
HomeHome DocumentationDocumentation

time-new

Creates a new time with the specified components.
Parameter
Type
Description
hour
Number?
The hour component (0-23)
minute
Number?
The minute component (0-59)
second
Number?
The second component (0-59)
return
time
A new time with the specified hour, minute, and second
Test Case:Create time and get hour
    <div></div>
    
    <time-new hour="14" minute="30" second="45">
    <time-get component="hour">
    <assert-equal value="14" type="number">
    
    👆 Try to change something!
  • Test Case:Create time and get minute
      <div></div>
      
      <time-new hour="14" minute="30" second="45">
      <time-get component="minute">
      <assert-equal value="30" type="number">
      
      👆 Try to change something!
    • Test Case:Create time and get second
        <div></div>
        
        <time-new hour="14" minute="30" second="45">
        <time-get component="second">
        <assert-equal value="45" type="number">
        
        👆 Try to change something!
      • Test succeeded Test failed