https://github.com/r0mb0/time_parser_classic_asp
Write time how do you want on front-end and get the correct time format on back-end.
https://github.com/r0mb0/time_parser_classic_asp
asp-classic class classic-asp classic-asp-la classic-asp-language italian-developers r0mb0 time-parse time-parsing
Last synced: 3 months ago
JSON representation
Write time how do you want on front-end and get the correct time format on back-end.
- Host: GitHub
- URL: https://github.com/r0mb0/time_parser_classic_asp
- Owner: R0mb0
- License: mit
- Created: 2025-01-14T15:01:27.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-02-03T16:57:13.000Z (4 months ago)
- Last Synced: 2025-03-01T18:17:20.000Z (3 months ago)
- Topics: asp-classic, class, classic-asp, classic-asp-la, classic-asp-language, italian-developers, r0mb0, time-parse, time-parsing
- Language: Classic ASP
- Homepage:
- Size: 65.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
- Support: SUPPORT.md
Awesome Lists containing this project
README
# Time Parser in Classic ASP
[](https://app.codacy.com/gh/R0mb0/Time_Parser_classic_asp/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[](https://github.com/R0mb0/Time_Parser_classic_asp)
[](https://github.com/R0mb0/Time_Parser_classic_asp)
[](https://opensource.org/license/mit)[](http://paypal.me/R0mb0)
## `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"%>
<%
Dim my_time
set my_time = new timeParser
```
2. Parse times
```
Dim temp
temp = "16:15:13"
Response.write("Original Time: " & temp & "
")
Response.write("Time Parsed: " & my_time.time_parser(temp, "h") & " Setting: h
")temp = "16_15_13"
Response.write("Original Time: " & temp & "
")
Response.write("Time Parsed: " & my_time.time_parser(temp, "h") & " Setting: h
")temp = "16:15:13"
Response.write("Original Time: " & temp & "
")
Response.write("Time Parsed: " & my_time.time_parser(temp, "m") & " Setting: m
")temp = "16_15_13"
Response.write("Original Time: " & temp & "
")
Response.write("Time Parsed: " & my_time.time_parser(temp, "m") & " Setting: m
")temp = "16:15:13"
Response.write("Original Time: " & temp & "
")
Response.write("Time Parsed: " & my_time.time_parser(temp, "s") & " Setting: s
")temp = "16_15_13"
Response.write("Original Time: " & temp & "
")
Response.write("Time Parsed: " & my_time.time_parser(temp, "s") & " Setting: s
")
%>
```