-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from mdaubie/feat/21/add-formats-enum
Feat/21/add formats enum
- Loading branch information
Showing
4 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
src/main/java/io/github/mdaubie/subtitlesparser/constants/SUB_FILE_FORMATS.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package io.github.mdaubie.subtitlesparser.constants; | ||
|
||
import io.github.mdaubie.subtitlesparser.model.Format; | ||
import io.github.mdaubie.subtitlesparser.model.SubRipFile; | ||
|
||
public final class SUB_FILE_FORMATS { | ||
public static final Format<SubRipFile> SUB_RIP_FORMAT = new Format<>("SubRip", "srt", SubRipFile.class, TIMESTAMP_FORMATS.ISO_8601_COMA.value); | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/io/github/mdaubie/subtitlesparser/constants/TIMESTAMP_FORMATS.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package io.github.mdaubie.subtitlesparser.constants; | ||
|
||
import java.time.format.DateTimeFormatter; | ||
|
||
public enum TIMESTAMP_FORMATS { | ||
ISO_8601_COMA(DateTimeFormatter.ofPattern("HH:mm:ss,SSS")), | ||
ISO_8601_DOT(DateTimeFormatter.ofPattern("HH:mm:ss.SSS")), | ||
; | ||
|
||
public final DateTimeFormatter value; | ||
|
||
TIMESTAMP_FORMATS(DateTimeFormatter value) { | ||
this.value = value; | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/java/io/github/mdaubie/subtitlesparser/model/Format.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters