Skip to content

Commit 710ee55

Browse files
committed
Replace date-fns for hand-rolled date formatting
Closes #443 Fixes #436
1 parent fe7b69c commit 710ee55

File tree

12 files changed

+946
-43
lines changed

12 files changed

+946
-43
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Check out documentation and other usage examples in the [`docs` directory](./doc
115115
Anything else means all processes should exit successfully.
116116
- `restartTries`: how many attempts to restart a process that dies will be made. Default: `0`.
117117
- `restartDelay`: how many milliseconds to wait between process restarts. Default: `0`.
118-
- `timestampFormat`: a [date-fns format](https://date-fns.org/v2.0.1/docs/format)
118+
- `timestampFormat`: a [Unicode format](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table)
119119
to use when prefixing with `time`. Default: `yyyy-MM-dd HH:mm:ss.ZZZ`
120120
- `additionalArguments`: list of additional arguments passed that will get replaced in each command. If not defined, no argument replacing will happen.
121121

bin/concurrently.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,9 @@ const args = yargs(hideBin(process.argv))
164164
},
165165
'timestamp-format': {
166166
alias: 't',
167-
describe: 'Specify the timestamp in moment/date-fns format.',
167+
describe:
168+
'Specify the timestamp in Unicode format:\n' +
169+
'https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table',
168170
default: defaults.timestampFormat,
169171
type: 'string',
170172
},

declarations/intl.d.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
2+
// TODO: Delete this file once Typescript has added these.
3+
declare namespace Intl {
4+
interface DateTimeFormatPartTypesRegistry {
5+
yearName: any;
6+
relatedYear: any;
7+
}
8+
9+
/**
10+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo
11+
*/
12+
interface WeekInfo {
13+
firstDay: number;
14+
weekend: readonly number[];
15+
minimalDays: number;
16+
}
17+
18+
interface Locale {
19+
readonly weekInfo: WeekInfo;
20+
}
21+
}

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
"license": "MIT",
5858
"dependencies": {
5959
"chalk": "^4.1.2",
60-
"date-fns": "^2.30.0",
6160
"lodash": "^4.17.21",
6261
"rxjs": "^7.8.1",
6362
"shell-quote": "^1.8.1",

pnpm-lock.yaml

Lines changed: 0 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)