summaryrefslogtreecommitdiff
path: root/src/types/Date.d.ts
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-13 17:57:06 +0100
committerJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-13 17:57:06 +0100
commit1118c377e32940ada179bfcde1549b73d8948626 (patch)
treeb9c858a47d19f129f20e06b102f7631c00d4fa71 /src/types/Date.d.ts
parent08dbc1dc92dfa5e6842529775ffcf6f32fc220c8 (diff)
Pulls out Date components
Diffstat (limited to 'src/types/Date.d.ts')
-rw-r--r--src/types/Date.d.ts38
1 files changed, 4 insertions, 34 deletions
diff --git a/src/types/Date.d.ts b/src/types/Date.d.ts
index e13ea08..cfdcbeb 100644
--- a/src/types/Date.d.ts
+++ b/src/types/Date.d.ts
@@ -1,37 +1,7 @@
-type Year = `${19 | 20}${Digit}${Digit}`;
-type Month = '01' | '02' | '03' | '04' | '05' | '06' | '07' | '08' | '09' | '10' | '11' | '12';
-type Day =
- | '01'
- | '02'
- | '03'
- | '04'
- | '05'
- | '06'
- | '07'
- | '08'
- | '09'
- | '10'
- | '11'
- | '12'
- | '13'
- | '14'
- | '15'
- | '16'
- | '17'
- | '18'
- | '19'
- | '20'
- | '21'
- | '22'
- | '23'
- | '24'
- | '25'
- | '26'
- | '27'
- | '28'
- | '29'
- | '30'
- | '31';
+import type Year from './Year';
+import type Month from './Month';
+import type Day from './Day';
+
type Date = `${Year}-${Month}-${Day}`;
export default Date;