Skip to content

Write time how do you want on front-end and get the correct time on back-end.

License

Notifications You must be signed in to change notification settings

R0mb0/Time_Parser_classic_asp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Time Parser in Classic ASP

Codacy Badge

Maintenance Open Source Love svg3 MIT

Donate

time_parser.class.asp's avaible functions

  • Funtion to parse a time by a selector used to understand the time -> Public Function time_parser(time, selector)
    • Where the selector could be:
      • "h" -> for interpret time from Hours
      • "m" -> for interpret time from Minutes
      • "s" -> for interpret time from Seconds

How to use

From Test.asp

  1. Initialize the class
    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="time_parser.class.asp"-->
    <%
       Dim my_time 
       set my_time = new timeParser
  2. Parse times
      Dim temp
    
      temp = "16:15:13"
      Response.write("Original Time: " & temp & "<br>")
      Response.write("Time Parsed: " & my_time.time_parser(temp, "h") & " Setting: h <br><br>")
    
      temp = "16_15_13"
      Response.write("Original Time: " & temp & "<br>")
      Response.write("Time Parsed: " & my_time.time_parser(temp, "h") & " Setting: h <br><br>")
    
      temp = "16:15:13"
      Response.write("Original Time: " & temp & "<br>")
      Response.write("Time Parsed: " & my_time.time_parser(temp, "m") & " Setting: m <br><br>")
    
      temp = "16_15_13"
      Response.write("Original Time: " & temp & "<br>")
      Response.write("Time Parsed: " & my_time.time_parser(temp, "m") & " Setting: m <br><br>")
    
      temp = "16:15:13"
      Response.write("Original Time: " & temp & "<br>")
      Response.write("Time Parsed: " & my_time.time_parser(temp, "s") & " Setting: s <br><br>")
    
      temp = "16_15_13"
      Response.write("Original Time: " & temp & "<br>")
      Response.write("Time Parsed: " & my_time.time_parser(temp, "s") & " Setting: s <br><br>")
    %>
Not made by AI

About

Write time how do you want on front-end and get the correct time on back-end.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

Contributors