diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/types/Date.d.ts | 38 | ||||
| -rw-r--r-- | src/types/Day.d.ts | 34 | ||||
| -rw-r--r-- | src/types/Month.d.ts | 3 | ||||
| -rw-r--r-- | src/types/Year.d.ts | 3 |
4 files changed, 44 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; diff --git a/src/types/Day.d.ts b/src/types/Day.d.ts new file mode 100644 index 0000000..1e25cf4 --- /dev/null +++ b/src/types/Day.d.ts @@ -0,0 +1,34 @@ +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'; + +export default Day; diff --git a/src/types/Month.d.ts b/src/types/Month.d.ts new file mode 100644 index 0000000..bfd5659 --- /dev/null +++ b/src/types/Month.d.ts @@ -0,0 +1,3 @@ +type Month = '01' | '02' | '03' | '04' | '05' | '06' | '07' | '08' | '09' | '10' | '11' | '12'; + +export default Month; diff --git a/src/types/Year.d.ts b/src/types/Year.d.ts new file mode 100644 index 0000000..2575b4e --- /dev/null +++ b/src/types/Year.d.ts @@ -0,0 +1,3 @@ +type Year = `${19 | 20}${Digit}${Digit}`; + +export default Year; |
