mirror of
https://github.com/p-stream/p-stream.git
synced 2026-04-21 16:12:17 +00:00
Update TIDBSubmissionForm.tsx
This commit is contained in:
parent
96417a6fdf
commit
32b0588530
1 changed files with 2 additions and 2 deletions
|
|
@ -19,7 +19,7 @@ function parseTimeToSeconds(timeStr: string): number | null {
|
||||||
if (!timeStr.trim()) return null;
|
if (!timeStr.trim()) return null;
|
||||||
|
|
||||||
// Check if it's in hh:mm:ss format
|
// Check if it's in hh:mm:ss format
|
||||||
const hhmmssMatch = timeStr.match(/^($\d{1,2}$):($[0-5]?\d$):($[0-5]?\d$)$/);
|
const hhmmssMatch = timeStr.match(/^(\d{1,2}):(0?[0-5]\d):(0?[0-5]\d)$/);
|
||||||
if (hhmmssMatch) {
|
if (hhmmssMatch) {
|
||||||
const hours = parseInt(hhmmssMatch[1], 10);
|
const hours = parseInt(hhmmssMatch[1], 10);
|
||||||
const minutes = parseInt(hhmmssMatch[2], 10);
|
const minutes = parseInt(hhmmssMatch[2], 10);
|
||||||
|
|
@ -33,7 +33,7 @@ function parseTimeToSeconds(timeStr: string): number | null {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if it's in mm:ss format
|
// Check if it's in mm:ss format
|
||||||
const mmssMatch = timeStr.match(/^($\d{1,3}$):($[0-5]?\d$)$/);
|
const mmssMatch = timeStr.match(/^(\d{1,3}):(0?[0-5]\d)$/);
|
||||||
if (mmssMatch) {
|
if (mmssMatch) {
|
||||||
const minutes = parseInt(mmssMatch[1], 10);
|
const minutes = parseInt(mmssMatch[1], 10);
|
||||||
const seconds = parseInt(mmssMatch[2], 10);
|
const seconds = parseInt(mmssMatch[2], 10);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue