-
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.
- Loading branch information
Showing
3 changed files
with
98 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"""RegexRules object for datetime-like versions.""" | ||
|
||
from .regex_rules import RegexRules | ||
|
||
yymmddRules: RegexRules = RegexRules( | ||
rules = { | ||
"yymmdd": r".*(?P<major>\d{2})(?P<minor>\d{2})(?P<patch>\d{2})" | ||
} | ||
) | ||
"""RegexRules for version strings of the type YYMMDD. | ||
This object has the following equivalent aliases: yymmdd and YYMMDD. | ||
""" | ||
|
||
yymmddRules.add_alias("yymmdd", "YYMMDD") | ||
|
||
|
||
yyyymmddRules: RegexRules = RegexRules( | ||
rules = { | ||
"yyyymmdd": r".*(?P<major>\d{4})(?P<minor>\d{2})(?P<patch>\d{2})" | ||
} | ||
) | ||
"""RegexRules for version strings of the type YYYYMMDD. | ||
This object has the following equivalent aliases: yyyymmdd and YYYYMMDD. | ||
""" | ||
|
||
yyyymmddRules.add_alias("yyyymmdd", "YYYYMMDD") |
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